import {Layout, LayoutProps} from 'sentry/components/onboarding/gettingStartedDoc/layout'; import {ModuleProps} from 'sentry/components/onboarding/gettingStartedDoc/sdkDocumentation'; import {StepProps, StepType} from 'sentry/components/onboarding/gettingStartedDoc/step'; import {getUploadSourceMapsStep} from 'sentry/components/onboarding/gettingStartedDoc/utils'; import {t, tct} from 'sentry/locale'; import { getDefaulServerlessImports, getDefaultInitParams, getInstallSnippet, getProductInitParams, getProductIntegrations, getProductSelectionMap, joinWithIndentation, } from 'sentry/utils/gettingStartedDocs/node'; interface StepsParams { importContent: string; initContent: string; installSnippetNpm: string; installSnippetYarn: string; sourceMapStep: StepProps; } export const steps = ({ installSnippetYarn, installSnippetNpm, importContent, initContent, sourceMapStep, }: StepsParams): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t('Add the Sentry Serverless SDK as a dependency:'), configurations: [ { code: [ { label: 'npm', value: 'npm', language: 'bash', code: installSnippetNpm, }, { label: 'yarn', value: 'yarn', language: 'bash', code: installSnippetYarn, }, ], }, ], }, { type: StepType.CONFIGURE, description: (
{tct("Wrap your lambda handler with Sentry's [code:wraphandler] function:", {
code: ,
})}