sfdx-hardis
Version:
Swiss-army-knife Toolbox for Salesforce. Allows you to define a complete CD/CD Pipeline. Orchestrate base commands and assist users with interactive wizards
59 lines (58 loc) • 2.57 kB
TypeScript
import { SfCommand } from '@salesforce/sf-plugins-core';
import { AnyJson } from '@salesforce/ts-types';
import fs from 'fs-extra';
export default class Toml2Csv extends SfCommand<any> {
static title: string;
static description: string;
static examples: string[];
static flags: any;
static requiresProject: boolean;
protected transfoConfig: any;
protected transfoConfigFile: string;
protected rootConfigDirectory: string;
protected outputDir: string;
protected skipTransfo: boolean;
protected filterSections: any[];
protected doFilterSections: boolean;
protected spinnerCustom: any;
protected spinnerInterval: any;
protected inputFileSeparator: string;
protected outputFileSeparator: string;
protected tomlSectionsFileWriters: any;
protected tomlSectionsErrorsFileWriters: any;
protected loadedTranscos: any;
protected csvFiles: string[];
protected currentSection: string | null;
protected sectionLineIds: any;
protected sectionLines: any;
protected lineErrorMessages: any;
protected stats: {
sectionLinesNb: number;
dataLinesNb: number;
emptyLinesNb: number;
totalLinesNb: number;
dataSuccessLinesNb: number;
dataErrorLinesNb: number;
dataFilteredLinesNb: number;
dataDuplicatesNb: number;
sections: {};
};
run(): Promise<AnyJson>;
updateSpinner(): void;
createSectionWriteStream(section: string, errMode?: boolean): Promise<fs.WriteStream | undefined>;
writeLine(lineSf: string, streamWriter: any): Promise<void>;
convertLineToSfThenWrite(section: string, lineSplit: string[], flags: any): Promise<void>;
processConcat(fields: any, section: any, linesSfArray: any, colDefinition: any): any;
manageTransformation(transfo: any, colVal: any, colDefinition: any): any;
getTranscoValue(transfo: any, colVal: string, colDefinition: any): any;
getTranscoValues(transfo: any): any;
checkFilter(filter: any, lineSplit: any, currentSection: any): boolean;
checkFilterDate(filter: any, lineSplit: any): boolean;
checkFilterParentId(filter: any, lineSplit: any): any;
checkFilterColValue(filter: any, lineSplit: any): boolean;
addLineInCache(currentSection: any, lineSplit: any, lineWrite: any, success?: boolean): void;
checkNotDuplicate(currentSection: any, lineWrite: any): boolean;
completeTransfoConfig(transfoConfig: any): any;
triggerError(errorMsg: string, fatal?: boolean): void;
formatCsvCell(cellVal: string): string;
}