Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICommandProfileTypeConfiguration

Cmd packages additions to the profile manager type configuration document. Used by the CliProfileManager. Allows profiles to be built from command arguments. See the "CliProfileManager" for more information.

export
interface

ICommandProfileTypeConfiguration

Hierarchy

Index

Properties

Optional authConfig

Configuration for authentication services to associate with this profile type.

Optional createProfileExamples

createProfileExamples: ICommandExampleDefinition[]

Examples to be displayed in the help text for the auto generated create profile command.

memberof

IProfileTypeConfiguration

Optional createProfileFromArgumentsHandler

createProfileFromArgumentsHandler: string

A handler module which Imperative will require(). The module's default export should be a handler that calls appendResponseObject on the provided commandParameters.response You do NOT have to implement writing the profile to disk -- you only have to produce the final profile object that you would like to be written.

This is only required if finished profile can't be created directly from the arguments, e.g. if you have --user and --password and need to always transform it into a basic auth

If omitted, Imperative will just write all fields present from the schema into the profile without requiring a module

memberof

IProfileTypeConfiguration

Optional dependencies

dependencies: IProfileDependency[]

The profile dependency specification. Indicates the required or optional profiles that a profile is depedent on. Dependencies are written as part of the profile, but you do NOT need to specify dependencies in your schema document - this is automatically generated based on your specifications.

memberof

IProfileTypeConfiguration

schema

The JSON schema document. The schema document provides a way to enforce the contents of a profile. The schema conforms exactly to the JSON schema specification. You must supply all properties you would like validated for correctness on the schema, except for "dependencies". Dependency schema checking is generated automatically if you populate the dependencies property of this document.

type

type: string

The name of the profile "type" (e.g. "banana"). The type should be indicative of the profile contents (defined by the profile schema on this document). A "type" is analogous to a category.

memberof

IProfileTypeConfiguration

Optional updateProfileExamples

updateProfileExamples: ICommandExampleDefinition[]

Examples to be displayed in the help text for the auto generated update profile command.

memberof

IProfileTypeConfiguration

Optional updateProfileFromArgumentsHandler

updateProfileFromArgumentsHandler: string

The module's default export should be a handler that calls appendResponseObject on the provided commandParameters.response You do NOT have to implement writing the profile to disk -- you only have to produce the final profile object that you would like to be written.

This is only required if finished updated profile can't be created directly from the arguments, e.g. if certain fields that the user might specify mean that other fields should be deleted or updated.

If omitted, Imperative will load the old profile, overwrite any fields specified by the user, and write the updated profile to disk.

memberof

IProfileTypeConfiguration

Optional validationPlanModule

validationPlanModule: string

Path to a module that contains an object that matches the interface IProfileValidationPlan. This is optional, but if provided a "validate profile" command will be generated to give the user a report on the validity of their profile.

memberof

IProfileTypeConfiguration

Generated using TypeDoc