tsdk
Version:
Type-safe API development and code share tool for TypeScript projects.
61 lines (60 loc) • 1.81 kB
TypeScript
export interface TSDKConfig {
packageDir: string;
packageName: string;
/** 'typeorm' or 'kysely' or 'DrizzleORM' */
entityLibName: string | string[];
baseDir: string;
entityExt: string;
apiconfExt: string;
shareExt?: string;
sharedDirs: string[];
monorepoRoot?: string;
/** default: axios */
httpLib?: 'xior' | 'axios';
dataHookLib?: 'SWR' | 'ReactQuery';
/** custom dependencies or override */
dependencies?: {
[key: string]: string;
};
devDependencies?: {
[key: string]: string;
};
/** custom scripts or override */
scripts?: {
[key: string]: string;
};
/**
* remove unnecessary filelds in *.apiconf.js after build
* @default
* [
'needAuth',
'category',
'description',
'type',
]
*/
removeFields?: string[];
}
export declare const comment = "\n/**\n * This is auto generated by `tsdk`.\n * Don't edit this file.\n */\n";
export declare const getDefaultContent: () => string;
export declare const tsdkConfigFilePath: string;
export declare const isTsdkConfigExist: boolean;
/** Deprecated: Use `tsdk.config.js` instead `.tsdkrc.json` */
export declare const oldConfigFilePath: string;
export declare const idOldConfigExist: boolean;
export declare const isConfigExist: boolean;
export declare const config: TSDKConfig;
export declare const packageFolder: string;
export declare const ensureDir: string;
export declare const tsconfigExists: boolean;
export declare const tsconfig: any;
export declare const pkg: {
[key: string]: string;
};
export declare function parsePkg(): Promise<{
[key: string]: string;
}>;
export declare function parseDeps(): Promise<void>;
export declare function getDeps(): {
[key: string]: string;
};