All files / src/Config snconfigfieldmodel.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37        1x         1x                                                 1x    
/**
 * @module Config
 *//** */
 
import { SnConfigBehavior } from './snconfigbehavior';
 
/**
 * Class that represents a model for a field in the SnConfig (usually sn.config.js) module file
 */
export class SnConfigFieldModel {
    /**
     * The name of the field (e.g. RepositoryUrl). This will be used also as a key in command line options and in the sn.config.js module
     */
    public FieldName?: string;
 
    /**
     * The field will be stored with this name in the SnConfigFieldModelStore (usually 'ModelName.FieldName')
     */
    public StoreKey?: string;
 
    /**
     * Optional description. Will be dislpayed in the CLI Help screen.
     */
    public FieldDescription?: string;
 
    /**
     * This question will be asked when the field is needed but not provided.
     */
    public Question: string;
 
    /**
     * The behavoir of the field, can be flagged
     * @default SnConfigBehavior.Default
     */
    public Behavior: SnConfigBehavior = SnConfigBehavior.Default;
}