import type { SdkProvider } from '../aws-auth/private'; import type { Settings } from '../settings'; export type Env = { [key: string]: string | undefined; }; export type Context = { [key: string]: unknown; }; /** * If we don't have region/account defined in context, we fall back to the default SDK behavior * where region is retrieved from ~/.aws/config and account is based on default credentials provider * chain and then STS is queried. * * This is done opportunistically: for example, if we can't access STS for some reason or the region * is not configured, the context value will be 'null' and there could failures down the line. In * some cases, synthesis does not require region/account information at all, so that might be perfectly * fine in certain scenarios. * * @param context - The context key/value bash. */ export declare function prepareDefaultEnvironment(aws: SdkProvider, debugFn: (msg: string) => Promise): Promise; /** * Create context from settings. * * Mutates the `context` object and returns it. */ export declare function contextFromSettings(settings: Settings): Record; /** * Convert settings to context/environment variables */ export declare function synthParametersFromSettings(settings: Settings): { context: Context; env: Env; }; export declare function spaceAvailableForContext(env: Env, limit: number): number; /** * Guess the executable from the command-line argument * * Input is the "app" string the user gave us. Output is the command line we are going to execute. * * - On Windows: it's hard to verify if registry associations have or have not * been set up for this file type (i.e., ShellExec'ing the file will work or not), * so we'll assume the worst and take control ourselves. * * - On POSIX: if the file is NOT marked as executable, guess the interpreter. If it is executable, * the correct interpreter should be in the file's shebang and we just execute it directly. * * The behavior of only guessing the interpreter if the command line is a single file name * is a bit limited: we can't put a `.js` file with arguments in the command line and have * it work properly. Nevertheless, this is the behavior we have had for a long time and nobody * has really complained about it, so we'll keep it for now. */ export declare function guessExecutable(commandLine: string, debugFn: (msg: string) => Promise): Promise; //# sourceMappingURL=environment.d.ts.map