@sentry/wizard
Version:
Sentry wizard helping you to configure your project
42 lines (41 loc) • 1.66 kB
TypeScript
import type { Answers } from 'inquirer';
import type { Args } from '../Constants';
import { Config } from '../Types';
export interface SentryCliProps {
'defaults/url': string;
'defaults/org': string | null;
'defaults/project': string | null;
'auth/token': string | null;
'cli/executable'?: string;
}
type SentryCliConfig = Record<string, Partial<SentryCliProps>>;
type RequireResolve = typeof require.resolve;
export declare class SentryCli {
protected _argv: Args;
private _resolve;
constructor(_argv: Args);
setResolveFunction(resolve: RequireResolve): void;
convertAnswersToProperties(answers: Answers & {
config?: Config;
}): SentryCliProps;
/**
* Create the contents of a `sentry.properties` file
* @param props the properties to write to the file
* @param format the format of the file, either `rc`
* (.sentryclirc) or `properties` (sentry.properties)
*/
dumpProperties(props: Partial<SentryCliProps>, format?: 'rc' | 'properties'): string;
dumpConfig(config: Partial<SentryCliConfig>): string;
/**
* Creates `.sentryclirc` and `sentry.properties` files with the CLI properties
* obtained from the user answers (or from logging into Sentry).
* The `.sentryclirc` only contains the auth token and will be added to the
* user's `.gitignore` file. The properties file contains the rest of the
* properties (org, project, etc.).
*
* @param sentryCli instance of the Sentry CLI
* @param cliProps the properties to write to the files
*/
createSentryCliConfig(cliProps: SentryCliProps): Promise<void>;
}
export {};