### Hierarchy

- ConvertV1Profiles

## Index

### Properties

- builtInCredMgrNm
- convertOpts
- convertResult
- credMgrKey
- noCfgFilePathNm
- oldProfilesDir
- oldScsPluginNm
- oldScsPluginWasConfigured
- profileInfo
- profilesRootDir
- zoweKeyRing

### Methods

- addExceptionToConvertMsgs
- addToConvertMsgs
- convert
- convertPropNames
- createNewConfigFile
- deleteOldSecureProps
- deleteV1Profiles
- findOldSecureProps
- getOldPluginInfo
- getOldProfileCount
- initCredMgr
- isConversionNeeded
- isPluginInstalled
- isZoweKeyRingAvailable
- loadV1Schemas
- moveV1ProfilesToConfigFile
- putCfgFileNmInResult
- replaceOldCredMgrOverride

## Properties

### Static Private Readonly builtInCredMgrNm

builtInCredMgrNm: string = "@zowe/cli"

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:47

### Static Private convertOpts

convertOpts: IConvertV1ProfOpts = null

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:51

### Static Private convertResult

convertResult: IConvertV1ProfResult = null

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:52

### Static Private Readonly credMgrKey

credMgrKey: string = "CredentialManager"

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:45

### Static Private Readonly noCfgFilePathNm

noCfgFilePathNm: string = "CouldNotGetPathToConfigFile"

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:44

### Static Private oldProfilesDir

oldProfilesDir: string = "NotYetSet"

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:54

### Static Private Readonly oldScsPluginNm

oldScsPluginNm: "@zowe/secure-credential-store-for-zowe-cli" = "@zowe/secure-credential-store-for-zowe-cli"

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:46

### Static Private oldScsPluginWasConfigured

oldScsPluginWasConfigured: boolean = false

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:50

### Static Private profileInfo

profileInfo: ProfileInfo = null

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:49

### Static Private profilesRootDir

profilesRootDir: string = "NotYetSet"

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:53

### Static Private zoweKeyRing

zoweKeyRing: typeof keyring = undefined

- Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:55

## Methods

### Static Private addExceptionToConvertMsgs

- addExceptionToConvertMsgs(introMsg: string, error: Error): void

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:736

  Add a new message to the V1 profile conversion messages that reports a caught exception.

  #### Parameters

  - ##### introMsg: string

    An introductory message describing what action was being attempted when we failed.

  - ##### error: Error

    The exception that we caught.

  #### Returns void

### Static Private addToConvertMsgs

- addToConvertMsgs(msgFormat: number, msgText: string): void

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:749

  Add a new message to the V1 profile conversion messages.

  #### Parameters

  - ##### msgFormat: number

    Formatting clues for the message.

  - ##### msgText: string

    Unformatted text of the message.

  #### Returns void

### Static convert

- convert(convertOpts: IConvertV1ProfOpts): Promise<IConvertV1ProfResult>

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:78

  Convert V1 profiles into a zowe.config.json file.

  It will also do the following: Create a zowe.schema.json file. Migrate V1 secure properties into the current consolidated Zowe client secure properties. Replace old SCS-plugin credential manager override with the Zowe embedded SCS. Delete old V1 profiles (and old V1 secure properties) if requested.

  Calling this function after having already converted, will not attempt to convert again. However it will still delete the old profiles if requested.

  You should NOT initialize the secure credential manager before calling this function. The CredMgr can only be initialized once. If the old V1 SCS-plugin happens to be configured as the CredMgr when this function is called, the old V1 SCS-plugin CredMgr is unable to create the current consolidated Zowe client secure properties. Users will have to re-enter all of their credentials.

  #### Parameters

  - ##### convertOpts: IConvertV1ProfOpts

    Options that will control the conversion process.

  #### Returns Promise<IConvertV1ProfResult>

  Result object into which messages and stats are stored.

### Static Private convertPropNames

- convertPropNames(convertedConfig: IConfig): void

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:500

  Convert a set of known property names to their new names for V2 conformance (and later releases).

  #### Parameters

  - ##### convertedConfig: IConfig

    The converted client configuration in which we shall rename obsolete property names to their conformant names.

  #### Returns void

### Static Private createNewConfigFile

- createNewConfigFile(convertedConfig: IConfig): Promise<void>

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:347

  Create a new zowe client config file from an IConfig object. Store the name of the new config file in our convertResult object.

  #### Parameters

  - ##### convertedConfig: IConfig

    IConfig object created as a result of V1 profile conversion.

  #### Returns Promise<void>

  string - Path name to the newly created config file.

### Static Private deleteOldSecureProps

- deleteOldSecureProps(acct: string, propName: string): Promise<boolean>

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:717

  Delete the secure property specified from the operating system credential vault.

  #### Parameters

  - ##### acct: string

    The account the property is stored under

  - ##### propName: string

    The name of the property to delete

  #### Returns Promise<boolean>

  true if the property was deleted successfully

### Static Private deleteV1Profiles

- deleteV1Profiles(): Promise<void>

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:442

  Delete the V1 profiles that have been converted. We also delete the secure credentials stored for those V1 profiles.

  #### Returns Promise<void>

### Static Private findOldSecureProps

- findOldSecureProps(acct: string): Promise<string[]>

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:694

  Locate the names of secured properties stored under an account in the operating system's credential vault.

  #### Parameters

  - ##### acct: string

    The account to search for in the credential store

  #### Returns Promise<string[]>

  a list of secured properties stored under the specified account

### Static Private getOldPluginInfo

- getOldPluginInfo(): IOldPluginInfo

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:561

  Retrieve info about old plug-ins and their overrides.

  #### Returns IOldPluginInfo

  IOldPluginInfo plugins - List of CLI plug-ins to uninstall overrides - List of overrides to replace in app settings

### Static Private getOldProfileCount

- getOldProfileCount(profilesRootDir: string): number

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:659

  Get the number of old profiles present in the CLI home dir.

  #### Parameters

  - ##### profilesRootDir: string

    Root profiles directory

  #### Returns number

  Number of old profiles found

### Static Private initCredMgr

- initCredMgr(): Promise<void>

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:226

  Initialize credential manager so that we can migrate the secure properties that are stored for V1 profiles to new secure properties for the converted config that we will create.

  For all CLI commands other than convert-profiles, the credential manager is loaded in Imperative.init and frozen with Object.freeze so it cannot be modified later on. Because convert-profiles cannot create new secure properties for the converted config (if the old SCS plugin credMgr is already loaded), Imperative.init does not load the credential manager for the convert-profiles command.

  VSCode extensions must also avoid initializing the Credential Manager before calling ConvertV1Profiles.convert.

  If we encounter an error when trying to initialize the credential manager, we report (through ConvertV1Profiles.convertResult.credsWereMigrated) that creds were not migrated.

  #### Returns Promise<void>

### Static Private isConversionNeeded

- isConversionNeeded(): Promise<boolean>

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:135

  Detect whether we must convert any V1 profiles to a zowe client configuration.

  #### Returns Promise<boolean>

  True means we must do a conversion. False otherwise.

### Static Private isPluginInstalled

- isPluginInstalled(pluginName: string): boolean

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:634

  Report whether the specified plugin is installed.

  #### Parameters

  - ##### pluginName: string

    name of the plugin to search for.

  #### Returns boolean

  True if plugin is installed. False otherwise.

### Static Private isZoweKeyRingAvailable

- isZoweKeyRingAvailable(): Promise<boolean>

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:674

  Verify that the credential vault is accessible, or whether there is a problem.

  #### Returns Promise<boolean>

  true if credential vault is available, false if it is not

### Static Private loadV1Schemas

- loadV1Schemas(): void

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:398

  Load V1 profile schemas, which will not have been loaded for VSCode extensions.

  #### Returns void

### Static Private moveV1ProfilesToConfigFile

- moveV1ProfilesToConfigFile(): Promise<void>

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:258

  Move the contents of existing v1 profiles to a zowe client config file.

  #### Returns Promise<void>

  The path name to the new zowe client config file (null upon failure).

### Static Private putCfgFileNmInResult

- putCfgFileNmInResult(configForPath: Config): void

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:427

  Put the path name to the config file, obtained from the supplied Config object, into our result object.

  #### Parameters

  - ##### configForPath: Config

    The config object from which we will extract the path.

  #### Returns void

### Static Private replaceOldCredMgrOverride

- replaceOldCredMgrOverride(): void

- - Defined in @zowe/imperative/src/config/src/ConvertV1Profiles.ts:185

  Replace any detected oldCredMgr override entry in settings.json with the Zowe embedded credMgr.

  After the replacement of the credential manager override, we can then initialize credential manager later in this class.

  #### Returns void

Generated using TypeDoc