UNPKG

1.07 kBTypeScriptView Raw
1/**
2 * Return a location that will be used as the CDK home directory.
3 * Currently the only thing that is placed here is the cache.
4 *
5 * First try to use the users home directory (i.e. /home/someuser/),
6 * but if that directory does not exist for some reason create a tmp directory.
7 *
8 * Typically it wouldn't make sense to create a one time use tmp directory for
9 * the purpose of creating a cache, but since this only applies to users that do
10 * not have a home directory (some CI systems?) this should be fine.
11 */
12export declare function cdkHomeDir(): string;
13export declare function cdkCacheDir(): string;
14/**
15 * From the current file, find the directory that contains the CLI's package.json
16 *
17 * Can't use `__dirname` in production code, as the CLI will get bundled as it's
18 * released and `__dirname` will refer to a different location in the `.ts` form
19 * as it will in the final executing form.
20 */
21export declare function rootDir(): string;
22export declare function rootDir(fail: true): string;
23export declare function rootDir(fail: false): string | undefined;