/** * @class ScafflaterOptions * @classdesc The options to generate files */ export class ScafflaterOptions { /** * @param {?(ScafflaterOptions|object)} options The options that must override defaults */ constructor(options?: (ScafflaterOptions | object) | null); lineCommentTemplate: string; startRegionMarker: string; endRegionMarker: string; optionMarker: string; targetName: any; /** * Ignore files or folders * * @description If boolean, indicates if a file or folder must be ignored. If array of strings, indicates patterns (same patterns of gitignore) to ignore. * @type {(boolean|string[])} ignore */ ignore: (boolean | string[]); logRun: boolean; annotate: boolean; annotationTemplate: string; /** * Append Strategy * * @description Action to include generated code on target: * - append: The content will be appended to the destination (Default) * - replace: The content will replace the target content * - ignore: If the destination exists and is not empty, will ignore the generated code. * * Available for: File Content * @type {('append'|'replace'|'ignore')} */ appendStrategy: ('append' | 'replace' | 'ignore'); /** * Mode to run scafflater. Util for debug files generations. * * @description Action to include generated code on target: * - prod: Normal Execution (Default) * - debug: Will disable async execution. Useful to debug generator. * @type {('prod'|'debug')} */ mode: ('prod' | 'debug'); processors: string[]; appenders: string[]; /** * Array Append Strategy. Available for yaml and json appenders. * * @description Action to include generated code on target: * - combine: The array will be combine item per item (Default) * - concat: The arrays will be concatenated * - replace: The source array will replace the target array * - ignore: If the destination exists and is not empty, will ignore the source array. * - key: the parameter 'keyName' will be used as item key to merge arrays. The object of source will replace the object with the same key value on target. * * Available for: File Content * @type {('combine'|'concat'|'replace'|'ignore'|'key')} */ arrayAppendStrategy: ('combine' | 'concat' | 'replace' | 'ignore' | 'key'); scfFolderName: string; scfFileName: string; initFolderName: string; partialsFolderName: string; hooksFolderName: string; helpersFolderName: string; /** * Folder containing extensions for code generation. This folder can contain Appenders and Processors */ extensionFolderName: string; cacheStorage: string; cacheStorages: { tempDir: string; homeDir: string; }; source: string; sources: { git: string; githubClient: string; isomorphicGit: string; localFolder: string; }; githubBaseUrlApi: string; githubBaseUrl: string; githubUsername: any; githubPassword: any; ignores(basePath: any, folderOrFile: any): boolean; /** * Loads Folder Options * * @description Looks for .scafflater file in folder, loads it if exists and returns an ScaffolderOptions object with the actual parameters with the loaded from file. * @param {string} folderPath Folder to load the Options * @returns {Promise} The merged Options */ getFolderOptions(folderPath: string): Promise; /** * Loads File Options * * @description Looks for @scf-option in file content, loads it if exists and returns an ScaffolderOptions object with the actual parameters with the loaded options from file. * @param {string} filePath File to load the Options * @returns {Promise} The merged Options */ getFileOptions(filePath: string): Promise; /** * Loads @scf-option from strong * * @description Looks for @scf-option in string, loads it if exists and returns an ScaffolderOptions object with the actual parameters with the loaded options. * @param {string} str String with @scf-option * @returns {Promise} The merged Options */ getConfigFromString(str: string): Promise; /** * Strips all @scf-option from strong * * @description Looks for @scf-option in string, and removes the line with the config * @param {string} str String with @scf-option * @returns {Promise} The striped string */ stripConfig(str: string): Promise; }