@ibgib/helper-gib
Version:
common helper/utils/etc used in ibgib libs. Node v19+ needed for heavily-used isomorphic webcrypto hashing consumed in both node and browsers.
91 lines • 2.89 kB
text/typescript
import { RCLIArgTypeName, RCLIParamInfo } from "./rcli-types.mjs";
/**
* The keys of this object are the primary prefixes. The values are the arrays
* of alternate param prefixes.
*
* primary-param-prefix -> alt-param-prefix[]
*
* this is for making synonyms in a more normalized way.
*/
export declare const PARAM_PREFIXES: {
[paramName: string]: string[];
};
/**
* builds a parameter with prefix synonyms.
*
* helper specifically for rcli params with prefixes.
*/
export declare function getParam_src({ paramName, noBare, argTypeName, description, }: {
paramName: string;
/**
* set to true if you don't want a synonym that is just {@link paramName}
* (without a prefix).
*
* For example, i differentiate between PARAM_INFO_NAME and
* PARAM_INFO_SRC_NAME, so on src_name I don't want the bare "name" because
* that is in PARAM_INFO_NAME.
*/
noBare?: boolean;
argTypeName?: RCLIArgTypeName;
description?: string;
}): RCLIParamInfo;
/**
* builds a parameter with prefix synonyms.
*
* helper specifically for rcli params with prefixes.
*/
export declare function getParam_dest({ paramName, argTypeName, description }: {
paramName: string;
argTypeName?: RCLIArgTypeName;
description?: string;
}): RCLIParamInfo;
/**
* special param that is used as the only param allowed that doesn't have a
* "double-dash-specifier=" form. one "bare" arg is allowed atow. if a bare arg
* is found, it will be mapped to this param info.
*/
export declare const PARAM_INFO_BARE: RCLIParamInfo;
/**
* the most essential parameter in existence...we all need it.
*/
export declare const PARAM_INFO_HELP: RCLIParamInfo;
/**
* flag for dry-run (not producing output but simulating what WOULD be produced)
*/
export declare const PARAM_INFO_DRY_RUN: RCLIParamInfo;
/**
* path pointing to a data resource (file/folder)
*/
export declare const PARAM_INFO_DATA_PATH: RCLIParamInfo;
/**
* for referencing/ingesting file(s)/folder(s) in a fs
*/
export declare const PARAM_INFO_INPUT_PATH: RCLIParamInfo;
/**
* for generating file(s)/folder(s)
*/
export declare const PARAM_INFO_OUTPUT_PATH: RCLIParamInfo;
/**
* catchall data as a string parameter
*/
export declare const PARAM_INFO_DATA_STRING: RCLIParamInfo;
/**
* catchall data as an integer parameter
*/
export declare const PARAM_INFO_DATA_INTEGER: RCLIParamInfo;
/**
* catchall data as a boolean parameter
*/
export declare const PARAM_INFO_DATA_BOOLEAN: RCLIParamInfo;
/**
* used for when you have a name of whatever, based on command/context.
*
* i'm adding this for `PARAM_INFO_GENERATE_SOURCE_FILE` (downstream in
* ibgib/rcli app), but should be reusable.
*/
export declare const PARAM_INFO_NAME: RCLIParamInfo;
/**
* Array of common parameters.
*/
export declare const COMMON_PARAM_INFOS: RCLIParamInfo[];
//# sourceMappingURL=rcli-constants.d.mts.map