@worldware/msg-cli
    Preparing search index...

    Class default

    Serializes MsgResource objects to XLIFF 2.2 files in l10n/xliff on a per-project basis.

    Hierarchy

    • Command
      • default
    Index
    • Parameters

      • argv: string[]
      • config: Config

      Returns default

    argv: string[]
    config: Config
    debug: (...args: any[]) => void
    id: string | undefined
    aliases: string[]

    An array of aliases for this command.

    args: ArgInput

    An order-dependent object of arguments for the command

    baseFlags: FlagInput
    deprecateAliases?: boolean

    Emit deprecation warning when a command alias is used

    deprecationOptions?: Deprecation
    description: string = "Serialize msg resources in i18n/resources to XLIFF 2.2 files in l10n/xliff (per project)"

    A full description of how to use the command.

    If no summary, the first line of the description will be used as the summary.

    enableJsonFlag: boolean
    examples: Example[]

    An array of examples to show at the end of the command's help.

    IF only a string is provided, it will try to look for a line that starts with the cmd.bin as the example command and the rest as the description. If found, the command will be formatted appropriately.

    EXAMPLES:
    A description of a particular use case.

    $ <%= config.bin => command flags
    flags: {
        help: BooleanFlag<void>;
        project: OptionFlag<string | undefined, CustomOptions>;
    } = ...

    A hash of flags for the command

    hasDynamicHelp: boolean
    help: string | undefined
    hidden: boolean

    Hide the command from help

    hiddenAliases: string[]

    An array of aliases for this command that are hidden from help.

    id: string

    A command ID, used mostly in error or verbose reporting.

    plugin: Plugin | undefined
    pluginAlias?: string
    pluginName?: string
    pluginType?: string
    state?: string

    Mark the command as a given state (e.g. beta or deprecated) in help

    strict: boolean

    When set to false, allows a variable amount of arguments

    summary?: string

    The tweet-sized description for your class, used in a parent-commands sub-command listing and as the header for the command help.

    usage: string | string[] | undefined

    An override string (or strings) for the default usage documentation.

    • get ctor(): typeof Command

      Returns typeof Command

    • Type Parameters

      • T

      Returns Promise<T>

    • Parameters

      • err: CommandError

      Returns Promise<any>

    • Parameters

      • input: string | Error
      • options: { code?: string; exit: false } & PrettyPrintableError

      Returns void

    • Parameters

      • input: string | Error
      • Optionaloptions: { code?: string; exit?: number } & PrettyPrintableError

      Returns never

    • Parameters

      • Optionalcode: number

      Returns never

    • Parameters

      • _: Error | undefined

      Returns Promise<any>

    • Returns Promise<any>

    • Determine if the command is being run with the --json flag in a command that supports it.

      Returns boolean

      true if the command supports json and the --json flag is present

    • Parameters

      • Optionalmessage: string
      • ...args: any[]

      Returns void

    • Parameters

      • json: unknown

      Returns void

    • Parameters

      • Optionalmessage: string
      • ...args: any[]

      Returns void

    • Type Parameters

      • F extends FlagOutput
      • B extends FlagOutput
      • A extends ArgOutput

      Parameters

      • Optionaloptions: Input<F, B, A>
      • Optionalargv: string[]

      Returns Promise<ParserOutput<F, B, A>>

    • actual command run code goes here

      Returns Promise<void>

    • Parameters

      • err: unknown

      Returns any

    • Parameters

      • result: unknown

      Returns any

    • Parameters

      • input: string | Error

      Returns string | Error

    • Returns void

    • Parameters

      • flags: Record<string, unknown>

      Returns void

    • instantiate and run the command

      Type Parameters

      • T extends Command

      Parameters

      • this: new (argv: string[], config: Config) => T

        the command class

      • Optionalargv: string[]

        argv

      • Optionalopts: LoadOptions

        options

      Returns Promise<ReturnType<T["run"]>>

      result