Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ConfigUtils

Index

Accessors

Static onlyV1ProfilesExist

  • get onlyV1ProfilesExist(): boolean
  • Returns an indicator that the user has no team configuration, but we detected the existence of old-school V1 profiles. We will not work with the V1 profiles. This function can let you tell a user that they are incorrectly trying to use V1 profiles.

    Returns boolean

    True - Means there is NO team config AND we detected that a V1 profile exists. False otherwise.

Methods

Static coercePropValue

  • coercePropValue(value: any, type?: string): any
  • Coerces string property value to a boolean or number type.

    Parameters

    • value: any

      String value

    • Optional type: string

      Property type defined in the schema

    Returns any

    Boolean, number, or string

Static Private findProfTypeInNestedProfiles

  • findProfTypeInNestedProfiles(profileType: string, profilesObj: {}): boolean
  • Find the specified profile type in the specified (or nested) profiles.

    Parameters

    • profileType: string
       The profile type to search for.
      
    • profilesObj: {}
       The profile object in which we should search.
      

    Returns boolean

     True if we find the profile type. False otherwise.
    

Static formGlobOrProjProfileNm

  • formGlobOrProjProfileNm(profileType: string, globalConfig?: boolean): string
  • Form a profile name of a given profile type to be used as a default profile name. The name can vary based on whether the configuration to contain the profile is a global config or a project config.

    Currently, we only form a different global/project profile name for a base profile. The profile name for any other profile type is currently set to the profile type string.

    Parameters

    • profileType: string
       The profile type for which we will form a name.
      
    • Default value globalConfig: boolean = null
       Indicator that the caller knows that the profile name will be
       for a globalConfig (true) or project config (false).
       If globalConfig is not supplied, we interrogate any existing
       Config object to determine whether to form a global or project
       profile name.
      

    Returns string

     A string to be used as the profile name for the specified profile type.
    

Static getActiveProfileName

  • getActiveProfileName(profileType: string, cmdArguments?: ICommandArguments, defaultProfileName?: string): string
  • Retrieves the name of the active profile for the given type. If no such profile exists, returns the default name which can be used to create a new profile.

    Parameters

    • profileType: string

      The type of CLI profile

    • Optional cmdArguments: ICommandArguments

      CLI arguments which may specify a profile

    • Optional defaultProfileName: string

      Name to fall back to if profile doesn't exist. If not specified, the profile type will be used.

    Returns string

    The profile name

Static getZoweDir

  • getZoweDir(): string

Static initImpUtils

  • initImpUtils(appName: string): Logger

Static jsonPathMatches

  • jsonPathMatches(fullPath: string, partialPath: string): boolean

Static readExtendersJson

  • Reads the extenders.json file from the CLI home directory. Called once in readProfilesFromDisk and cached to minimize I/O operations.

    internal
    throws

    If the extenders.json file cannot be created when it does not exist.

    throws

    If the extenders.json file cannot be read.

    Returns IExtendersJsonOpts

Static secureSaveError

Static writeExtendersJson

Generated using TypeDoc