Init config

### Hierarchy

- InitHandler

### Implements

- ICommandHandler

## Index

### Properties

- params
- promptProps

### Methods

- initForDryRun
- initWithSchema
- process
- promptForProp

## Properties

### Private params

params: IHandlerParameters

- Defined in @zowe/imperative/src/imperative/src/config/cmd/init/init.handler.ts:29

### Private promptProps

promptProps: string[]

- Defined in @zowe/imperative/src/imperative/src/config/cmd/init/init.handler.ts:34

List of property names that have been prompted for.

## Methods

### Private initForDryRun

- initForDryRun(config: Config, user: boolean, globalConfig: boolean): Promise<any>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/init/init.handler.ts:172

  Do a dry run of creating JSON template for config. Also create a schema file in the same folder alongside the config.

  #### Parameters

  - ##### config: Config

    Config object to be populated

  - ##### user: boolean

    If true, properties will be left empty for user config

  - ##### globalConfig: boolean

    Is the config to be a global config?

  #### Returns Promise<any>

### Private initWithSchema

- initWithSchema(config: Config, user: boolean, globalConfig: boolean, overwrite: boolean): Promise<void>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/init/init.handler.ts:135

  Creates JSON template for config. Also creates a schema file in the same folder alongside the config.

  #### Parameters

  - ##### config: Config

    Config object to be populated

  - ##### user: boolean

    If true, properties will be left empty for user config

  - ##### globalConfig: boolean

    Is the config to be a global config?

  - ##### overwrite: boolean

    Shall we overwrite an existing config?

  #### Returns Promise<void>

### process

- process(params: IHandlerParameters): Promise<void>

- Implementation of ICommandHandler.process

  - Defined in @zowe/imperative/src/imperative/src/config/cmd/init/init.handler.ts:43

  Process the command and input.

  throws

    {ImperativeError}

  #### Parameters

  - ##### params: IHandlerParameters

    Parameters supplied by yargs

  #### Returns Promise<void>

### Private promptForProp

- promptForProp(propName: string, property: IProfileProperty): Promise<any>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/init/init.handler.ts:189

  Prompts for the value of a property on the CLI. Returns null if `--prompt false` argument is passed, or prompt times out, or a blank value is entered.

  #### Parameters

  - ##### propName: string

    The name of the property

  - ##### property: IProfileProperty

    The profile property definition

  #### Returns Promise<any>

Generated using TypeDoc