@sasjs/cli
Version:
Command line interface for SASjs
47 lines (46 loc) • 2.53 kB
TypeScript
import { Target, MacroVars } from '@sasjs/utils';
import SASjs from '@sasjs/adapter/node';
import { LogJson } from '../types';
export declare function inExistingProject(folderPath: string): Promise<boolean>;
export declare function diff(a: any[], b: any[]): any[];
export declare function createReactApp(folderPath: string): Promise<void>;
export declare function createAngularApp(folderPath: string): Promise<void>;
export declare function createMinimalApp(folderPath: string): Promise<void>;
export declare function createTemplateApp(folderPath: string, template: string): Promise<void>;
export declare function setupNpmProject(folderName: string): Promise<void>;
export declare function setupGitIgnore(folderName: string): Promise<void>;
export declare function setupDoxygen(folderPath: string): Promise<void>;
export declare function getUniqServicesObj(services: string[]): any;
export declare function executeShellScript(filePath: string, logFilePath: string): Promise<unknown>;
export declare function executePowerShellScript(filePath: string, logFilePath: string): Promise<void>;
/**
* Extracts plain text job log from fetched json log
* @param {object} logJson
*/
export declare function parseLogLines(logJson: LogJson): string;
/**
* Converts MacroVars JSON from command source param to sas statements
* The JSON must have the following structure:
* {"macroVars": {"var1": "val1", "var2": "val2"}}
*
* @param {object} json
*/
export declare function convertToSASStatements(json: MacroVars): string;
export declare const arrToObj: (arr: any[]) => any;
export declare const millisecondsToDdHhMmSs: (milliseconds: number) => string;
export declare function checkNodeVersion(): void;
export declare function getAdapterInstance(target: Target): SASjs;
export declare function displaySasjsRunnerError(username: string): void;
export declare const loadEnvVariables: (fileName: string) => Promise<void>;
export declare function prefixAppLoc(appLoc?: string, path?: string): string | null;
export declare const terminateProcess: (status: number) => never;
/**
* This function checks whether the current directory, or any of the parent
* directories, are part of a SASjs project. This is done by testing for
* the existence of a ./sasjs/sasjsconfig.json file.
*
* @returns boolean
*/
export declare const isSASjsProject: () => Promise<boolean>;
export declare const getNodeModulePath: (module: string) => Promise<string>;
export declare const isSasJsServerInServerMode: (target: Target) => Promise<boolean>;