NPM Build Utilities @ 0.3.0-alpha.9
    Preparing search index...

    Class Stage_ConsoleInternal

    To be used by AbstractStage and those that inherit from it.

    Includes a variety of utilities for printing messages to the console.

    0.1.0-alpha

    Implements

    Index

    Constructors

    Properties

    clr: Colour

    Colour slug for this colour-coding this class.

    config: Config.Class

    Current project config.

    Instance to use within/out the class.

    params: Params

    Current CLI params.

    Adds VariableInspector capabilities to the logger.

    Accessors

    • get prompt(): {
          bool: (
              message: string,
              level: number,
              opts?: Omit<Config<"bool", boolean>, "message">,
          ) => Promise<boolean | undefined>;
          input: (
              message: string,
              level: number,
              opts?: Omit<InputConfig, "message">,
          ) => Promise<string | undefined>;
          select: {
              <
                  T_Return extends string,
                  T_Config extends
                      Omit<SelectConfig<T_Return>, "choices"> & { choices: T_Return[] },
              >(
                  message: string,
                  level: number,
                  opts: Omit<T_Config, "message" | "theme">,
              ): Promise<T_Return | undefined>;
              <
                  T_Return extends SelectValue,
                  T_Config extends
                      Omit<SelectConfig<T_Return>, "choices"> & {
                          choices: {
                              value: T_Return;
                              description?: string;
                              disabled?: string | boolean;
                              name?: string;
                              short?: string;
                          }[];
                      },
              >(
                  message: string,
                  level: number,
                  opts: Omit<T_Config, "message" | "theme">,
              ): Promise<T_Return | undefined>;
          };
      }
      Internal

      Local versions of prompt utilities for easier use.

      Returns {
          bool: (
              message: string,
              level: number,
              opts?: Omit<Config<"bool", boolean>, "message">,
          ) => Promise<boolean | undefined>;
          input: (
              message: string,
              level: number,
              opts?: Omit<InputConfig, "message">,
          ) => Promise<string | undefined>;
          select: {
              <
                  T_Return extends string,
                  T_Config extends
                      Omit<SelectConfig<T_Return>, "choices"> & { choices: T_Return[] },
              >(
                  message: string,
                  level: number,
                  opts: Omit<T_Config, "message" | "theme">,
              ): Promise<T_Return | undefined>;
              <
                  T_Return extends SelectValue,
                  T_Config extends
                      Omit<SelectConfig<T_Return>, "choices"> & {
                          choices: {
                              value: T_Return;
                              description?: string;
                              disabled?: string | boolean;
                              name?: string;
                              short?: string;
                          }[];
                      },
              >(
                  message: string,
                  level: number,
                  opts: Omit<T_Config, "message" | "theme">,
              ): Promise<T_Return | undefined>;
          };
      }

      0.3.0-alpha.9

    Methods

    • Internal

      Parameters

      • message: string
      • level: number
      • Optionalopts: Omit<Config<"bool", boolean>, "message">

      Returns Promise<boolean | undefined>

    • Internal

      Type Parameters

      • T_Return extends string
      • T_Config extends Omit<SelectConfig<T_Return>, "choices"> & { choices: T_Return[] }

      Parameters

      • message: string
      • level: number
      • opts: Omit<T_Config, "message" | "theme">

      Returns Promise<T_Return | undefined>

    • Internal

      Type Parameters

      • T_Return extends SelectValue
      • T_Config extends Omit<SelectConfig<T_Return>, "choices"> & {
            choices: {
                value: T_Return;
                description?: string;
                disabled?: string | boolean;
                name?: string;
                short?: string;
            }[];
        }

      Parameters

      • message: string
      • level: number
      • opts: Omit<T_Config, "message" | "theme">

      Returns Promise<T_Return | undefined>