@sentry/wizard
Version:
Sentry wizard helping you to configure your project
28 lines (25 loc) • 692 B
text/typescript
import { Args } from '../../lib/Constants';
import { SentryCli } from '../../lib/Helper/SentryCli';
import { SentryProjectData } from '../utils/clack-utils';
export async function setupCLIConfig(
authToken: string,
selectedProject: SentryProjectData,
sentryUrl: string,
): Promise<void> {
const cli = new SentryCli({ url: sentryUrl } as Args);
const answers = {
config: {
organization: {
slug: selectedProject.organization.slug,
},
project: {
slug: selectedProject.slug,
},
auth: {
token: authToken,
},
},
};
const props = cli.convertAnswersToProperties(answers);
await cli.createSentryCliConfig(props);
}