diff --git a/static/app/components/onboarding/gettingStartedDoc/sdkDocumentation.tsx b/static/app/components/onboarding/gettingStartedDoc/sdkDocumentation.tsx index 0f82c09b7ea826..7c5a92b98fb7cf 100644 --- a/static/app/components/onboarding/gettingStartedDoc/sdkDocumentation.tsx +++ b/static/app/components/onboarding/gettingStartedDoc/sdkDocumentation.tsx @@ -1,6 +1,7 @@ import {useEffect, useState} from 'react'; import LoadingIndicator from 'sentry/components/loadingIndicator'; +import {useSourcePackageRegistries} from 'sentry/components/onboarding/gettingStartedDoc/useSourcePackageRegistries'; import {ProductSolution} from 'sentry/components/onboarding/productSelection'; import {PlatformKey} from 'sentry/data/platformCategories'; import type {Organization, PlatformIntegration, Project, ProjectKey} from 'sentry/types'; @@ -22,6 +23,7 @@ export type ModuleProps = { organization?: Organization; platformKey?: PlatformKey; projectId?: Project['id']; + sourcePackageRegistries?: ReturnType; }; // Loads the component containing the documentation for the specified platform @@ -33,6 +35,8 @@ export function SdkDocumentation({ organization, projectId, }: SdkDocumentationProps) { + const sourcePackageRegistries = useSourcePackageRegistries(organization); + const [module, setModule] = useState; }>(null); @@ -95,6 +99,7 @@ export function SdkDocumentation({ } const {default: GettingStartedDoc} = module; + return ( ); } diff --git a/static/app/components/onboarding/gettingStartedDoc/step.tsx b/static/app/components/onboarding/gettingStartedDoc/step.tsx index d8368aa117fdc1..5142aa36933762 100644 --- a/static/app/components/onboarding/gettingStartedDoc/step.tsx +++ b/static/app/components/onboarding/gettingStartedDoc/step.tsx @@ -47,6 +47,10 @@ type ConfigurationType = { * A callback to be invoked when the configuration is selected and copied to the clipboard */ onSelectAndCopy?: () => void; + /** + * Whether or not the configuration or parts of it are currently being loaded + */ + partialLoading?: boolean; }; interface BaseStepProps { @@ -79,6 +83,7 @@ function getConfiguration({ additionalInfo, onCopy, onSelectAndCopy, + partialLoading, }: ConfigurationType) { return ( @@ -89,6 +94,8 @@ function getConfiguration({ language={language} onCopy={onCopy} onSelectAndCopy={onSelectAndCopy} + hideCopyButton={partialLoading} + disableUserSelection={partialLoading} > {language === 'javascript' ? beautify.js(code, {indent_size: 2, e4x: true}) diff --git a/static/app/components/onboarding/gettingStartedDoc/useSourcePackageRegistries.tsx b/static/app/components/onboarding/gettingStartedDoc/useSourcePackageRegistries.tsx new file mode 100644 index 00000000000000..6f21e1d996c5c4 --- /dev/null +++ b/static/app/components/onboarding/gettingStartedDoc/useSourcePackageRegistries.tsx @@ -0,0 +1,40 @@ +import {useEffect} from 'react'; + +import {Organization} from 'sentry/types'; +import {handleXhrErrorResponse} from 'sentry/utils/handleXhrErrorResponse'; +import {useApiQuery} from 'sentry/utils/queryClient'; + +type ReleaseRegistrySdk = Record< + string, + { + canonical: string; + main_docs_url: string; + name: string; + package_url: string; + repo_url: string; + version: string; + } +>; + +/** + * Fetches the release registry list for SDKs + */ +export function useSourcePackageRegistries(organization: Organization) { + const releaseRegistrySdk = useApiQuery( + [`/organizations/${organization.slug}/sdks/`], + { + staleTime: Infinity, + } + ); + + useEffect(() => { + if (releaseRegistrySdk.error) { + handleXhrErrorResponse( + 'Failed to fetch sentry release registry', + releaseRegistrySdk.error + ); + } + }, [releaseRegistrySdk.error]); + + return releaseRegistrySdk; +} diff --git a/static/app/gettingStartedDocs/android/android.tsx b/static/app/gettingStartedDocs/android/android.tsx index 39270cd927d779..42db27c3365990 100644 --- a/static/app/gettingStartedDocs/android/android.tsx +++ b/static/app/gettingStartedDocs/android/android.tsx @@ -7,9 +7,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -28,10 +29,16 @@ export const steps = ({ configurations: [ { language: 'groovy', + partialLoading: sourcePackageRegistries?.isLoading, code: ` plugins { id "com.android.application" // should be in the same module - id "io.sentry.android.gradle" version "3.12.0" + id "io.sentry.android.gradle" version "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.android.gradle-plugin']?.version ?? + '3.12.0' + }" } `, }, @@ -139,8 +146,18 @@ export const nextSteps = [ ]; // Configuration End -export function GettingStartedWithAndroid({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithAndroid({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithAndroid; diff --git a/static/app/gettingStartedDocs/apple/apple-ios.tsx b/static/app/gettingStartedDocs/apple/apple-ios.tsx index 99df9c4c38d860..2af24193e090c8 100644 --- a/static/app/gettingStartedDocs/apple/apple-ios.tsx +++ b/static/app/gettingStartedDocs/apple/apple-ios.tsx @@ -7,9 +7,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -44,8 +45,13 @@ https://github.com/getsentry/sentry-cocoa.git

), language: 'swift', + partialLoading: sourcePackageRegistries?.isLoading, code: ` -.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.9.3"), +.package(url: "https://github.com/getsentry/sentry-cocoa", from: "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.cocoa']?.version ?? '8.9.3' + }"), `, }, ], @@ -231,8 +237,18 @@ export const nextSteps = [ ]; // Configuration End -export function GettingStartedWithIos({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithIos({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithIos; diff --git a/static/app/gettingStartedDocs/apple/apple-macos.tsx b/static/app/gettingStartedDocs/apple/apple-macos.tsx index 6682bd74c1024a..71772ec9f0b92f 100644 --- a/static/app/gettingStartedDocs/apple/apple-macos.tsx +++ b/static/app/gettingStartedDocs/apple/apple-macos.tsx @@ -7,9 +7,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -44,8 +45,13 @@ https://github.com/getsentry/sentry-cocoa.git

), language: 'swift', + partialLoading: sourcePackageRegistries?.isLoading, code: ` -.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.9.3"), +.package(url: "https://github.com/getsentry/sentry-cocoa", from: "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.cocoa']?.version ?? '8.9.3' + }"), `, }, ], @@ -183,8 +189,18 @@ export const nextSteps = [ ]; // Configuration End -export function GettingStartedWithMacos({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithMacos({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithMacos; diff --git a/static/app/gettingStartedDocs/apple/apple.tsx b/static/app/gettingStartedDocs/apple/apple.tsx index 0eb650fee44729..6c87618736441f 100644 --- a/static/app/gettingStartedDocs/apple/apple.tsx +++ b/static/app/gettingStartedDocs/apple/apple.tsx @@ -7,9 +7,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -44,8 +45,13 @@ https://github.com/getsentry/sentry-cocoa.git

), language: 'swift', + partialLoading: sourcePackageRegistries?.isLoading, code: ` -.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.9.3"), +.package(url: "https://github.com/getsentry/sentry-cocoa", from: "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.cocoa']?.version ?? '8.9.3' + }"), `, }, ], @@ -183,8 +189,18 @@ export const nextSteps = [ ]; // Configuration End -export function GettingStartedWithApple({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithApple({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithApple; diff --git a/static/app/gettingStartedDocs/capacitor/capacitor.tsx b/static/app/gettingStartedDocs/capacitor/capacitor.tsx index 53d4d52aed5fb2..100bbc68c4bdf3 100644 --- a/static/app/gettingStartedDocs/capacitor/capacitor.tsx +++ b/static/app/gettingStartedDocs/capacitor/capacitor.tsx @@ -8,9 +8,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t( diff --git a/static/app/gettingStartedDocs/cordova/cordova.tsx b/static/app/gettingStartedDocs/cordova/cordova.tsx index ce2d20142e618a..dca421017c1f9a 100644 --- a/static/app/gettingStartedDocs/cordova/cordova.tsx +++ b/static/app/gettingStartedDocs/cordova/cordova.tsx @@ -9,9 +9,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t('Install our SDK using the cordova command:'), diff --git a/static/app/gettingStartedDocs/dart/dart.tsx b/static/app/gettingStartedDocs/dart/dart.tsx index b4b85ee768e5b1..a3f7ccfde68669 100644 --- a/static/app/gettingStartedDocs/dart/dart.tsx +++ b/static/app/gettingStartedDocs/dart/dart.tsx @@ -7,9 +7,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -25,9 +26,14 @@ export const steps = ({ configurations: [ { language: 'yml', + partialLoading: sourcePackageRegistries?.isLoading, code: ` dependencies: - sentry: ^7.8.0 + sentry: ^${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dart']?.version ?? '7.8.0' + } `, }, ], @@ -162,8 +168,12 @@ Future processOrderBatch(ISentrySpan span) async { ]; // Configuration End -export function GettingStartedWithDart({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithDart({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithDart; diff --git a/static/app/gettingStartedDocs/dotnet/aspnet.tsx b/static/app/gettingStartedDocs/dotnet/aspnet.tsx index 0b809f3b7bf7fb..995b1deedb9785 100644 --- a/static/app/gettingStartedDocs/dotnet/aspnet.tsx +++ b/static/app/gettingStartedDocs/dotnet/aspnet.tsx @@ -13,9 +13,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -28,13 +29,23 @@ export const steps = ({ configurations: [ { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, description: t('Package Manager:'), - code: 'Install-Package Sentry.AspNet -Version 3.34.0', + code: `Install-Package Sentry.AspNet -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.aspnet']?.version ?? '3.34.0' + }`, }, { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, description: t('Using Entity Framework 6?'), - code: 'Install-Package Sentry.EntityFramework -Version 3.34.0', + code: `Install-Package Sentry.EntityFramework -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.ef']?.version ?? '3.34.0' + }`, }, ], additionalInfo: ( @@ -164,8 +175,12 @@ public class MvcApplication : HttpApplication ]; // Configuration End -export function GettingStartedWithAspnet({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithAspnet({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithAspnet; diff --git a/static/app/gettingStartedDocs/dotnet/aspnetcore.tsx b/static/app/gettingStartedDocs/dotnet/aspnetcore.tsx index 9b391728a2f265..5208096ee2cfe8 100644 --- a/static/app/gettingStartedDocs/dotnet/aspnetcore.tsx +++ b/static/app/gettingStartedDocs/dotnet/aspnetcore.tsx @@ -11,9 +11,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -26,13 +27,25 @@ export const steps = ({ configurations: [ { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, description: t('Package Manager:'), - code: 'Install-Package Sentry.AspNetCore -Version 3.34.0', + code: `Install-Package Sentry.AspNetCore -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.aspnetcore']?.version ?? + '3.34.0' + }`, }, { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, description: t('Or .NET Core CLI:'), - code: 'dotnet add package Sentry.AspNetCore -v 3.34.0', + code: `dotnet add package Sentry.AspNetCore -v ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.aspnetcore']?.version ?? + '3.34.0' + }`, }, ], }, @@ -215,8 +228,12 @@ public class HomeController : Controller ]; // Configuration End -export function GettingStartedWithAspnetcore({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithAspnetcore({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithAspnetcore; diff --git a/static/app/gettingStartedDocs/dotnet/awslambda.tsx b/static/app/gettingStartedDocs/dotnet/awslambda.tsx index e3f669abe40ecf..c90df049f2c77e 100644 --- a/static/app/gettingStartedDocs/dotnet/awslambda.tsx +++ b/static/app/gettingStartedDocs/dotnet/awslambda.tsx @@ -19,20 +19,33 @@ const introduction = ( ); export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t('Add the Sentry dependency:'), configurations: [ { language: 'powershell', - code: 'Install-Package Sentry.AspNetCore -Version 3.34.0', + partialLoading: sourcePackageRegistries?.isLoading, + code: `Install-Package Sentry.AspNetCore -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.aspnetcore']?.version ?? + '3.34.0' + }`, }, { language: 'shell', - code: 'dotnet add package Sentry.AspNetCore -v 3.34.0', + partialLoading: sourcePackageRegistries?.isLoading, + code: `dotnet add package Sentry.AspNetCore -v ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.aspnetcore']?.version ?? + '3.34.0' + }`, }, ], additionalInfo: ( @@ -131,8 +144,18 @@ public class BadController ]; // Configuration End -export function GettingStartedAwsLambda({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedAwsLambda({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedAwsLambda; diff --git a/static/app/gettingStartedDocs/dotnet/dotnet.tsx b/static/app/gettingStartedDocs/dotnet/dotnet.tsx index a0b9432b937434..0daaff0e5cefa7 100644 --- a/static/app/gettingStartedDocs/dotnet/dotnet.tsx +++ b/static/app/gettingStartedDocs/dotnet/dotnet.tsx @@ -22,9 +22,10 @@ const introduction = ( ); export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -37,12 +38,21 @@ export const steps = ({ configurations: [ { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, code: ` # Using Package Manager -Install-Package Sentry -Version 3.34.0 +Install-Package Sentry -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet']?.version ?? '3.34.0' + } # Or using .NET Core CLI -dotnet add package Sentry -v 3.34.0 +dotnet add package Sentry -v ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet']?.version ?? '3.34.0' + } `, }, ], @@ -186,8 +196,18 @@ transaction.Finish(); // Mark the transaction as finished and send it to Sentry ]; // Configuration End -export function GettingStartedWithDotnet({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithDotnet({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithDotnet; diff --git a/static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx b/static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx index a8b86279de2473..db15671d332d45 100644 --- a/static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx +++ b/static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx @@ -11,9 +11,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -26,20 +27,38 @@ export const steps = ({ configurations: [ { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, description: t('Package Manager:'), - code: 'Install-Package Sentry.Google.Cloud.Functions -Version 3.34.0', + code: `Install-Package Sentry.Google.Cloud.Functions -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.google-cloud-function'] + ?.version ?? '3.34.0' + }`, }, { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, description: t('Or .NET Core CLI:'), - code: 'dotnet add package Sentry.Google.Cloud.Functions -v 3.34.0', + code: `dotnet add package Sentry.Google.Cloud.Functions -v ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.google-cloud-function'] + ?.version ?? '3.34.0' + }`, }, { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: t('Or, manually add the Sentry dependency into your csproj file:'), code: ` - + `, }, @@ -162,8 +181,12 @@ public Task HandleAsync(HttpContext context) ]; // Configuration End -export function GettingStartedWithGCPFunctions({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithGCPFunctions({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithGCPFunctions; diff --git a/static/app/gettingStartedDocs/dotnet/maui.tsx b/static/app/gettingStartedDocs/dotnet/maui.tsx index ddaf7cc626df63..5b6427ce03fcb2 100644 --- a/static/app/gettingStartedDocs/dotnet/maui.tsx +++ b/static/app/gettingStartedDocs/dotnet/maui.tsx @@ -9,9 +9,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -24,11 +25,21 @@ export const steps = ({ configurations: [ { language: 'shell', - code: 'dotnet add package Sentry.Maui -v 3.34.0', + partialLoading: sourcePackageRegistries?.isLoading, + code: `dotnet add package Sentry.Maui -v ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.maui']?.version ?? '3.34.0' + }`, }, { language: 'powershell', - code: 'Install-Package Sentry.Maui -Version 3.34.0', + partialLoading: sourcePackageRegistries?.isLoading, + code: `Install-Package Sentry.Maui -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.maui']?.version ?? '3.34.0' + }`, }, ], }, @@ -186,8 +197,12 @@ transaction.Finish(); // Mark the transaction as finished and send it to Sentry ]; // Configuration End -export function GettingStartedWithMaui({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithMaui({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithMaui; diff --git a/static/app/gettingStartedDocs/dotnet/uwp.tsx b/static/app/gettingStartedDocs/dotnet/uwp.tsx index df795aa405a381..e3b5d661d9e20f 100644 --- a/static/app/gettingStartedDocs/dotnet/uwp.tsx +++ b/static/app/gettingStartedDocs/dotnet/uwp.tsx @@ -13,9 +13,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -28,12 +29,21 @@ export const steps = ({ configurations: [ { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, code: ` # Using Package Manager -Install-Package Sentry -Version 3.34.0 +Install-Package Sentry -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet']?.version ?? '3.34.0' + } # Or using .NET Core CLI -dotnet add package Sentry -v 3.34.0 +dotnet add package Sentry -v ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet']?.version ?? '3.34.0' + } `, }, ], @@ -224,8 +234,12 @@ transaction.Finish(); // Mark the transaction as finished and send it to Sentry ]; // Configuration End -export function GettingStartedWithUwp({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithUwp({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithUwp; diff --git a/static/app/gettingStartedDocs/dotnet/winforms.tsx b/static/app/gettingStartedDocs/dotnet/winforms.tsx index 258a6595f11055..d604ac45826794 100644 --- a/static/app/gettingStartedDocs/dotnet/winforms.tsx +++ b/static/app/gettingStartedDocs/dotnet/winforms.tsx @@ -13,9 +13,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -28,12 +29,21 @@ export const steps = ({ configurations: [ { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, code: ` # Using Package Manager -Install-Package Sentry -Version 3.34.0 +Install-Package Sentry -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet']?.version ?? '3.34.0' + } # Or using .NET Core CLI -dotnet add package Sentry -v 3.34.0 +dotnet add package Sentry -v ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet']?.version ?? '3.34.0' + } `, }, ], @@ -192,8 +202,12 @@ transaction.Finish(); // Mark the transaction as finished and send it to Sentry ]; // Configuration End -export function GettingStartedWithWinForms({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithWinForms({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithWinForms; diff --git a/static/app/gettingStartedDocs/dotnet/wpf.tsx b/static/app/gettingStartedDocs/dotnet/wpf.tsx index 0d222e9771c7e7..189de96a882978 100644 --- a/static/app/gettingStartedDocs/dotnet/wpf.tsx +++ b/static/app/gettingStartedDocs/dotnet/wpf.tsx @@ -13,9 +13,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -28,12 +29,21 @@ export const steps = ({ configurations: [ { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, code: ` # Using Package Manager -Install-Package Sentry -Version 3.34.0 +Install-Package Sentry -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet']?.version ?? '3.34.0' + } # Or using .NET Core CLI -dotnet add package Sentry -v 3.34.0 +dotnet add package Sentry -v ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet']?.version ?? '3.34.0' + } `, }, ], @@ -192,8 +202,12 @@ transaction.Finish(); // Mark the transaction as finished and send it to Sentry ]; // Configuration End -export function GettingStartedWithWpf({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithWpf({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithWpf; diff --git a/static/app/gettingStartedDocs/dotnet/xamarin.tsx b/static/app/gettingStartedDocs/dotnet/xamarin.tsx index 964c333571ea00..567384f4a29370 100644 --- a/static/app/gettingStartedDocs/dotnet/xamarin.tsx +++ b/static/app/gettingStartedDocs/dotnet/xamarin.tsx @@ -9,9 +9,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -24,12 +25,22 @@ export const steps = ({ configurations: [ { language: 'shell', + partialLoading: sourcePackageRegistries?.isLoading, code: ` # For Xamarin.Forms -Install-Package Sentry.Xamarin.Forms -Version 1.5.2 +Install-Package Sentry.Xamarin.Forms -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.xamarin-forms']?.version ?? + '1.5.2' + } # If you are not using Xamarin.Forms, but only Xamarin: -Install-Package Sentry.Xamarin -Version 1.5.2 +Install-Package Sentry.Xamarin -Version ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.xamarin']?.version ?? '1.5.2' + } `, }, ], @@ -239,8 +250,12 @@ transaction.Finish(); // Mark the transaction as finished and send it to Sentry ]; // Configuration End -export function GettingStartedWithXamarin({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithXamarin({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithXamarin; diff --git a/static/app/gettingStartedDocs/elixir/elixir.tsx b/static/app/gettingStartedDocs/elixir/elixir.tsx index 126c913d20700c..9909e9ba3800ae 100644 --- a/static/app/gettingStartedDocs/elixir/elixir.tsx +++ b/static/app/gettingStartedDocs/elixir/elixir.tsx @@ -9,9 +9,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/flutter/flutter.tsx b/static/app/gettingStartedDocs/flutter/flutter.tsx index 484c5ab83452e7..d918228688ebfb 100644 --- a/static/app/gettingStartedDocs/flutter/flutter.tsx +++ b/static/app/gettingStartedDocs/flutter/flutter.tsx @@ -7,9 +7,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -25,9 +26,14 @@ export const steps = ({ configurations: [ { language: 'yml', + partialLoading: sourcePackageRegistries?.isLoading, code: ` dependencies: - sentry_flutter: ^7.8.0 + sentry_flutter: ^${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dart.flutter']?.version ?? '7.8.0' + } `, }, ], @@ -239,8 +245,12 @@ Future processOrderBatch(ISentrySpan span) async { ]; // Configuration End -export function GettingStartedWithFlutter({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithFlutter({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithFlutter; diff --git a/static/app/gettingStartedDocs/go/echo.tsx b/static/app/gettingStartedDocs/go/echo.tsx index 140dd39168c7c7..a3cc8c80549f43 100644 --- a/static/app/gettingStartedDocs/go/echo.tsx +++ b/static/app/gettingStartedDocs/go/echo.tsx @@ -11,9 +11,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/go/fasthttp.tsx b/static/app/gettingStartedDocs/go/fasthttp.tsx index f86b77edb1e325..552bce38f66c26 100644 --- a/static/app/gettingStartedDocs/go/fasthttp.tsx +++ b/static/app/gettingStartedDocs/go/fasthttp.tsx @@ -11,9 +11,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/go/gin.tsx b/static/app/gettingStartedDocs/go/gin.tsx index 0e739d76a77599..bade7bcb0b1f90 100644 --- a/static/app/gettingStartedDocs/go/gin.tsx +++ b/static/app/gettingStartedDocs/go/gin.tsx @@ -11,9 +11,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/go/go.tsx b/static/app/gettingStartedDocs/go/go.tsx index ca03c435b8e9bc..f8e55ef8dc51f4 100644 --- a/static/app/gettingStartedDocs/go/go.tsx +++ b/static/app/gettingStartedDocs/go/go.tsx @@ -6,9 +6,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/go/http.tsx b/static/app/gettingStartedDocs/go/http.tsx index bfcf188fe3b791..5b27124b7f48da 100644 --- a/static/app/gettingStartedDocs/go/http.tsx +++ b/static/app/gettingStartedDocs/go/http.tsx @@ -11,9 +11,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/go/iris.tsx b/static/app/gettingStartedDocs/go/iris.tsx index 724a74ade4f19a..c6cc724b179f74 100644 --- a/static/app/gettingStartedDocs/go/iris.tsx +++ b/static/app/gettingStartedDocs/go/iris.tsx @@ -11,9 +11,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/go/martini.tsx b/static/app/gettingStartedDocs/go/martini.tsx index 430815811d9f27..9f7c7c3fc5a52e 100644 --- a/static/app/gettingStartedDocs/go/martini.tsx +++ b/static/app/gettingStartedDocs/go/martini.tsx @@ -11,9 +11,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/go/negroni.tsx b/static/app/gettingStartedDocs/go/negroni.tsx index ff36ad84ab4b4d..ae002acd00eb36 100644 --- a/static/app/gettingStartedDocs/go/negroni.tsx +++ b/static/app/gettingStartedDocs/go/negroni.tsx @@ -11,9 +11,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/ionic/ionic.tsx b/static/app/gettingStartedDocs/ionic/ionic.tsx index 5a293443d884e1..a821acb0718384 100644 --- a/static/app/gettingStartedDocs/ionic/ionic.tsx +++ b/static/app/gettingStartedDocs/ionic/ionic.tsx @@ -8,9 +8,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/java/java.tsx b/static/app/gettingStartedDocs/java/java.tsx index 4ea52b022049de..360e6db16276ce 100644 --- a/static/app/gettingStartedDocs/java/java.tsx +++ b/static/app/gettingStartedDocs/java/java.tsx @@ -21,9 +21,10 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t('Install the SDK via Gradle, Maven, or SBT:'), @@ -33,6 +34,7 @@ export const steps = ({ configurations: [ { language: 'groovy', + partialLoading: sourcePackageRegistries?.isLoading, description: (

{tct('For Gradle, add to your [code:build.gradle] file:', { @@ -48,12 +50,17 @@ repositories { // Add Sentry's SDK as a dependency. dependencies { - implementation 'io.sentry:sentry:6.27.0' + implementation 'io.sentry:sentry:${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java']?.version ?? '6.27.0' + }' } `, }, { language: 'groovy', + partialLoading: sourcePackageRegistries?.isLoading, description: t( 'To upload your source code to Sentry so it can be shown in stack traces, use our Gradle plugin.' ), @@ -65,7 +72,12 @@ buildscript { } plugins { - id "io.sentry.jvm.gradle" version "3.11.1" + id "io.sentry.jvm.gradle" version "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.android.gradle-plugin']?.version ?? + '3.11.1' + }" } sentry { @@ -87,6 +99,7 @@ sentry { configurations: [ { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: (

{tct('For Maven, add to your [code:pom.xml] file:', {code: })} @@ -96,12 +109,17 @@ sentry { io.sentry sentry - 6.27.0 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java']?.version ?? '6.27.0' + } `, }, { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: t( 'To upload your source code to Sentry so it can be shown in stack traces, use our Maven plugin.' ), @@ -111,7 +129,11 @@ sentry { io.sentry sentry-maven-plugin - 0.0.3 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.mavenplugin']?.version ?? '0.0.3' + } true @@ -154,7 +176,12 @@ sentry { { description:

{tct('For [strong:SBT]:', {strong: })}

, language: 'scala', - code: `libraryDependencies += "io.sentry" % "sentry" % "6.27.0"`, + partialLoading: sourcePackageRegistries?.isLoading, + code: `libraryDependencies += "io.sentry" % "sentry" % "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java']?.version ?? '6.27.0' + }"`, }, ], }, @@ -276,8 +303,18 @@ transaction.finish(); ]; // Configuration End -export function GettingStartedWithJava({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithJava({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithJava; diff --git a/static/app/gettingStartedDocs/java/log4j2.tsx b/static/app/gettingStartedDocs/java/log4j2.tsx index 12ec2ee1062b68..a34e47ca4de5d5 100644 --- a/static/app/gettingStartedDocs/java/log4j2.tsx +++ b/static/app/gettingStartedDocs/java/log4j2.tsx @@ -24,9 +24,10 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t( @@ -38,16 +39,22 @@ export const steps = ({ configurations: [ { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, code: ` io.sentry sentry-log4j2 - 6.27.0 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.log4j2']?.version ?? '6.27.0' + } `, }, { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: t( 'To upload your source code to Sentry so it can be shown in stack traces, use our Maven plugin.' ), @@ -57,7 +64,11 @@ export const steps = ({ io.sentry sentry-maven-plugin - 0.0.3 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.mavenplugin']?.version ?? '0.0.3' + } true @@ -99,7 +110,13 @@ export const steps = ({ configurations: [ { language: 'groovy', - code: "implementation 'io.sentry:sentry-log4j2:6.27.0'", + partialLoading: sourcePackageRegistries?.isLoading, + code: `implementation 'io.sentry:sentry-log4j2:${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.log4j2']?.version ?? + '6.27.0' + }'`, }, { description: t( @@ -114,7 +131,12 @@ buildscript { } plugins { - id "io.sentry.jvm.gradle" version "3.11.1" + id "io.sentry.jvm.gradle" version "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.android.gradle-plugin']?.version ?? + '3.11.1' + }" } sentry { @@ -268,8 +290,18 @@ try { ]; // Configuration End -export function GettingStartedWithLog4j2({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithLog4j2({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithLog4j2; diff --git a/static/app/gettingStartedDocs/java/logback.tsx b/static/app/gettingStartedDocs/java/logback.tsx index cbf6ab2711416f..93ac2e1dd78983 100644 --- a/static/app/gettingStartedDocs/java/logback.tsx +++ b/static/app/gettingStartedDocs/java/logback.tsx @@ -22,9 +22,10 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t( @@ -36,16 +37,22 @@ export const steps = ({ configurations: [ { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, code: ` io.sentry sentry-logback - 6.27.0 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.logback']?.version ?? '6.27.0' + } `, }, { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: t( 'To upload your source code to Sentry so it can be shown in stack traces, use our Maven plugin.' ), @@ -55,7 +62,11 @@ export const steps = ({ io.sentry sentry-maven-plugin - 0.0.3 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.mavenplugin']?.version ?? '0.0.3' + } true @@ -97,13 +108,20 @@ export const steps = ({ configurations: [ { language: 'groovy', - code: "implementation 'io.sentry:sentry-logback:6.27.0'", + partialLoading: sourcePackageRegistries?.isLoading, + code: `implementation 'io.sentry:sentry-logback:${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.logback']?.version ?? + '6.27.0' + }'`, }, { description: t( 'To upload your source code to Sentry so it can be shown in stack traces, use our Maven plugin.' ), language: 'groovy', + partialLoading: sourcePackageRegistries?.isLoading, code: ` buildscript { repositories { @@ -112,7 +130,12 @@ buildscript { } plugins { - id "io.sentry.jvm.gradle" version "3.11.1" + id "io.sentry.jvm.gradle" version "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.android.gradle-plugin']?.version ?? + '3.11.1' + }" } sentry { @@ -274,8 +297,18 @@ try { ]; // Configuration End -export function GettingStartedWithLogBack({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithLogBack({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithLogBack; diff --git a/static/app/gettingStartedDocs/java/spring-boot.tsx b/static/app/gettingStartedDocs/java/spring-boot.tsx index 716b919563e486..03ed39e529cd54 100644 --- a/static/app/gettingStartedDocs/java/spring-boot.tsx +++ b/static/app/gettingStartedDocs/java/spring-boot.tsx @@ -29,9 +29,10 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t('Install using either Maven or Gradle:'), @@ -41,23 +42,34 @@ export const steps = ({ configurations: [ { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: {t('Spring Boot 2')}, code: ` io.sentry sentry-spring-boot-starter - 6.27.0 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.spring-boot']?.version ?? '6.27.0' + } `, }, { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: {t('Spring Boot 3')}, code: ` io.sentry sentry-spring-boot-starter-jakarta - 6.27.0 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.spring-boot.jakarta']?.version ?? + '6.27.0' + } `, }, @@ -69,12 +81,24 @@ export const steps = ({ { language: 'properties', description: {t('Spring Boot 2')}, - code: "implementation 'io.sentry:sentry-spring-boot-starter:6.27.0'", + partialLoading: sourcePackageRegistries?.isLoading, + code: `implementation 'io.sentry:sentry-spring-boot-starter:${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.spring-boot']?.version ?? + '6.27.0' + }'`, }, { language: 'properties', + partialLoading: sourcePackageRegistries?.isLoading, description: {t('Spring Boot 3')}, - code: "implementation 'io.sentry:sentry-spring-boot-starter-jakarta:6.27.0'", + code: `implementation 'io.sentry:sentry-spring-boot-starter-jakarta:${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.spring-boot.jakarta'] + ?.version ?? '6.27.0' + }'`, }, ], }, @@ -136,7 +160,11 @@ sentry: io.sentry sentry-logback - 6.27.0 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.logback']?.version ?? '6.27.0' + } `, }, @@ -151,7 +179,11 @@ sentry: io.sentry sentry-maven-plugin - 0.0.3 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.mavenplugin']?.version ?? '0.0.3' + } true @@ -193,7 +225,13 @@ sentry: configurations: [ { language: 'properties', - code: "implementation 'io.sentry:sentry-logback:6.27.0'", + partialLoading: sourcePackageRegistries?.isLoading, + code: `implementation 'io.sentry:sentry-logback:${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.logback']?.version ?? + '6.27.0' + }'`, }, { language: 'javascript', // TODO: This shouldn't be javascript but because of better formatting we use it for now @@ -208,7 +246,12 @@ buildscript { } plugins { - id "io.sentry.jvm.gradle" version "3.11.1" + id "io.sentry.jvm.gradle" version "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.android.gradle-plugin']?.version ?? + '3.11.1' + }" } sentry { @@ -383,8 +426,18 @@ class PersonService { ]; // Configuration End -export function GettingStartedWithSpringBoot({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithSpringBoot({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithSpringBoot; diff --git a/static/app/gettingStartedDocs/java/spring.tsx b/static/app/gettingStartedDocs/java/spring.tsx index d2273f41f82408..1db921c506ac1a 100644 --- a/static/app/gettingStartedDocs/java/spring.tsx +++ b/static/app/gettingStartedDocs/java/spring.tsx @@ -28,9 +28,10 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t( @@ -42,23 +43,33 @@ export const steps = ({ configurations: [ { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: {t('Spring 5')}, code: ` io.sentry sentry-spring - 6.27.0 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.spring']?.version ?? '6.27.0' + } `, }, { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: {t('Spring 6')}, code: ` io.sentry sentry-spring-jakarta - 6.27.0 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.spring.jakarta']?.version ?? '6.27.0' + } `, }, @@ -155,6 +166,7 @@ import org.springframework.core.Ordered configurations: [ { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: t( 'To upload your source code to Sentry so it can be shown in stack traces, use our Maven plugin.' ), @@ -164,7 +176,11 @@ import org.springframework.core.Ordered io.sentry sentry-maven-plugin - 0.0.3 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.mavenplugin']?.version ?? '0.0.3' + } true @@ -206,12 +222,23 @@ import org.springframework.core.Ordered { description: {t('Spring 5')}, language: 'groovy', - code: `implementation 'io.sentry:sentry-spring:6.27.0'`, + partialLoading: sourcePackageRegistries?.isLoading, + code: `implementation 'io.sentry:sentry-spring:${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.spring']?.version ?? + '6.27.0' + }'`, }, { description: {t('Spring 6')}, language: 'groovy', - code: `implementation 'io.sentry:sentry-spring-jakarta:6.27.0'`, + code: `implementation 'io.sentry:sentry-spring-jakarta:${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.spring.jakarta'] + ?.version ?? '6.27.0' + }'`, }, ], }, @@ -272,6 +299,7 @@ try { configurations: [ { language: 'groovy', + partialLoading: sourcePackageRegistries?.isLoading, description: t( 'To upload your source code to Sentry so it can be shown in stack traces, use our Gradle plugin.' ), @@ -283,7 +311,12 @@ repositories { } plugins { -id "io.sentry.jvm.gradle" version "3.11.1" +id "io.sentry.jvm.gradle" version "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java.android.gradle-plugin'] + ?.version ?? '3.11.1' + }" } sentry { @@ -306,10 +339,20 @@ authToken = "your-sentry-auth-token" 'For other dependency managers see the [mavenRepositorySpring5Link:central Maven repository (Spring 5)] and [mavenRepositorySpring6Link:central Maven repository (Spring 6)].', { mavenRepositorySpring5Link: ( - + ), mavenRepositorySpring6Link: ( - + ), } )} @@ -334,8 +377,18 @@ authToken = "your-sentry-auth-token" ]; // Configuration End -export function GettingStartedWithSpring({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithSpring({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithSpring; diff --git a/static/app/gettingStartedDocs/kotlin/kotlin.tsx b/static/app/gettingStartedDocs/kotlin/kotlin.tsx index abf6b8fd0edd2e..ee13cf141fc342 100644 --- a/static/app/gettingStartedDocs/kotlin/kotlin.tsx +++ b/static/app/gettingStartedDocs/kotlin/kotlin.tsx @@ -26,9 +26,10 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: t('Install the SDK via Gradle or Maven:'), @@ -43,6 +44,7 @@ export const steps = ({ })}

), + partialLoading: sourcePackageRegistries?.isLoading, code: ` // Make sure mavenCentral is there. repositories { @@ -50,12 +52,17 @@ repositories { } dependencies { - implementation 'io.sentry:sentry:{{@inject packages.version('sentry.java', '4.0.0') }}' + implementation 'io.sentry:sentry:${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java']?.version ?? '4.0.0' + }' } `, }, { language: 'xml', + partialLoading: sourcePackageRegistries?.isLoading, description: (

{tct('For [strong:Maven], add to your [code:pom.xml] file:', { @@ -68,7 +75,11 @@ dependencies { io.sentry sentry - 6.25.0 + ${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.java']?.version ?? '6.25.0' + } `, }, @@ -175,8 +186,18 @@ throw e ]; // Configuration End -export function GettingStartedWithKotlin({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithKotlin({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ( + + ); } export default GettingStartedWithKotlin; diff --git a/static/app/gettingStartedDocs/minidump/minidump.tsx b/static/app/gettingStartedDocs/minidump/minidump.tsx index f17f6f877338cd..976f1847cfd3a1 100644 --- a/static/app/gettingStartedDocs/minidump/minidump.tsx +++ b/static/app/gettingStartedDocs/minidump/minidump.tsx @@ -10,9 +10,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { title: t('Creating and Uploading Minidumps'), description: ( diff --git a/static/app/gettingStartedDocs/native/native-qt.tsx b/static/app/gettingStartedDocs/native/native-qt.tsx index 3ed24a76068f5a..0cc964de8d79d4 100644 --- a/static/app/gettingStartedDocs/native/native-qt.tsx +++ b/static/app/gettingStartedDocs/native/native-qt.tsx @@ -9,9 +9,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/native/native.tsx b/static/app/gettingStartedDocs/native/native.tsx index 62422470ded7e1..3f1be795fd3423 100644 --- a/static/app/gettingStartedDocs/native/native.tsx +++ b/static/app/gettingStartedDocs/native/native.tsx @@ -9,9 +9,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/php/laravel.tsx b/static/app/gettingStartedDocs/php/laravel.tsx index 135856a11394f0..667b1a66f7b8b9 100644 --- a/static/app/gettingStartedDocs/php/laravel.tsx +++ b/static/app/gettingStartedDocs/php/laravel.tsx @@ -25,9 +25,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, configurations: [ diff --git a/static/app/gettingStartedDocs/php/php.tsx b/static/app/gettingStartedDocs/php/php.tsx index a0e430f050c098..db838002c3a0fd 100644 --- a/static/app/gettingStartedDocs/php/php.tsx +++ b/static/app/gettingStartedDocs/php/php.tsx @@ -7,9 +7,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/php/symfony.tsx b/static/app/gettingStartedDocs/php/symfony.tsx index 512490ef56ed01..23cfae05b7dac4 100644 --- a/static/app/gettingStartedDocs/php/symfony.tsx +++ b/static/app/gettingStartedDocs/php/symfony.tsx @@ -18,9 +18,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, configurations: [ diff --git a/static/app/gettingStartedDocs/python/aiohttp.tsx b/static/app/gettingStartedDocs/python/aiohttp.tsx index 63ffc829fa01b2..acea5ca5c2cf7f 100644 --- a/static/app/gettingStartedDocs/python/aiohttp.tsx +++ b/static/app/gettingStartedDocs/python/aiohttp.tsx @@ -18,9 +18,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/asgi.tsx b/static/app/gettingStartedDocs/python/asgi.tsx index 182a0311216359..d4449607d68413 100644 --- a/static/app/gettingStartedDocs/python/asgi.tsx +++ b/static/app/gettingStartedDocs/python/asgi.tsx @@ -18,9 +18,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.CONFIGURE, description: ( diff --git a/static/app/gettingStartedDocs/python/awslambda.tsx b/static/app/gettingStartedDocs/python/awslambda.tsx index 14773afe92eeb5..f2563efc656390 100644 --- a/static/app/gettingStartedDocs/python/awslambda.tsx +++ b/static/app/gettingStartedDocs/python/awslambda.tsx @@ -25,9 +25,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/bottle.tsx b/static/app/gettingStartedDocs/python/bottle.tsx index 7ee4a4a08fd902..bab134199e265e 100644 --- a/static/app/gettingStartedDocs/python/bottle.tsx +++ b/static/app/gettingStartedDocs/python/bottle.tsx @@ -18,9 +18,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/celery.tsx b/static/app/gettingStartedDocs/python/celery.tsx index 5648d294157d60..53ebe57dea3e0a 100644 --- a/static/app/gettingStartedDocs/python/celery.tsx +++ b/static/app/gettingStartedDocs/python/celery.tsx @@ -17,9 +17,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.CONFIGURE, description: ( diff --git a/static/app/gettingStartedDocs/python/chalice.tsx b/static/app/gettingStartedDocs/python/chalice.tsx index dca8949a2c0846..24c1c97a6ec997 100644 --- a/static/app/gettingStartedDocs/python/chalice.tsx +++ b/static/app/gettingStartedDocs/python/chalice.tsx @@ -7,9 +7,7 @@ import {tct} from 'sentry/locale'; export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/falcon.tsx b/static/app/gettingStartedDocs/python/falcon.tsx index 4b2b913ca8be17..e3fa713c34eebd 100644 --- a/static/app/gettingStartedDocs/python/falcon.tsx +++ b/static/app/gettingStartedDocs/python/falcon.tsx @@ -18,9 +18,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/fastapi.tsx b/static/app/gettingStartedDocs/python/fastapi.tsx index 965bc32ba58a0b..c8a8c3c7f0af0f 100644 --- a/static/app/gettingStartedDocs/python/fastapi.tsx +++ b/static/app/gettingStartedDocs/python/fastapi.tsx @@ -15,9 +15,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/flask.tsx b/static/app/gettingStartedDocs/python/flask.tsx index 339986c359adca..83ad6ba926c975 100644 --- a/static/app/gettingStartedDocs/python/flask.tsx +++ b/static/app/gettingStartedDocs/python/flask.tsx @@ -7,9 +7,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/gcpfunctions.tsx b/static/app/gettingStartedDocs/python/gcpfunctions.tsx index fc0a73a466cc84..31a165a0698c12 100644 --- a/static/app/gettingStartedDocs/python/gcpfunctions.tsx +++ b/static/app/gettingStartedDocs/python/gcpfunctions.tsx @@ -12,9 +12,7 @@ import {space} from 'sentry/styles/space'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/mongo.tsx b/static/app/gettingStartedDocs/python/mongo.tsx index 93cdd46182d8bd..30057b6ea7b36d 100644 --- a/static/app/gettingStartedDocs/python/mongo.tsx +++ b/static/app/gettingStartedDocs/python/mongo.tsx @@ -18,9 +18,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/pylons.tsx b/static/app/gettingStartedDocs/python/pylons.tsx index 394e3bb815a5f4..a775da153d8ede 100644 --- a/static/app/gettingStartedDocs/python/pylons.tsx +++ b/static/app/gettingStartedDocs/python/pylons.tsx @@ -6,9 +6,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/pyramid.tsx b/static/app/gettingStartedDocs/python/pyramid.tsx index 71d389a4cbfe0f..7fb8994f8d8491 100644 --- a/static/app/gettingStartedDocs/python/pyramid.tsx +++ b/static/app/gettingStartedDocs/python/pyramid.tsx @@ -18,9 +18,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description:

{tct('Install [code:sentry-sdk] from PyPI:', {code: })}

, diff --git a/static/app/gettingStartedDocs/python/python.tsx b/static/app/gettingStartedDocs/python/python.tsx index 63e6db6332e1a7..ddc3e231349933 100644 --- a/static/app/gettingStartedDocs/python/python.tsx +++ b/static/app/gettingStartedDocs/python/python.tsx @@ -6,9 +6,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/quart.tsx b/static/app/gettingStartedDocs/python/quart.tsx index d5408f0d2b47d0..9295db403c08da 100644 --- a/static/app/gettingStartedDocs/python/quart.tsx +++ b/static/app/gettingStartedDocs/python/quart.tsx @@ -23,9 +23,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description:

{tct('Install [code:sentry-sdk] from PyPI:', {code: })}

, diff --git a/static/app/gettingStartedDocs/python/rq.tsx b/static/app/gettingStartedDocs/python/rq.tsx index 3075e4f9448b1e..53beac47fbf502 100644 --- a/static/app/gettingStartedDocs/python/rq.tsx +++ b/static/app/gettingStartedDocs/python/rq.tsx @@ -15,9 +15,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.CONFIGURE, description: ( diff --git a/static/app/gettingStartedDocs/python/sanic.tsx b/static/app/gettingStartedDocs/python/sanic.tsx index c6ae52492be394..632b287b39442a 100644 --- a/static/app/gettingStartedDocs/python/sanic.tsx +++ b/static/app/gettingStartedDocs/python/sanic.tsx @@ -41,9 +41,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description:

{tct('Install [code:sentry-sdk] from PyPI:', {code: })}

, diff --git a/static/app/gettingStartedDocs/python/serverless.tsx b/static/app/gettingStartedDocs/python/serverless.tsx index 8fbe79a6c057cf..e8ee834185a065 100644 --- a/static/app/gettingStartedDocs/python/serverless.tsx +++ b/static/app/gettingStartedDocs/python/serverless.tsx @@ -14,9 +14,7 @@ import {t, tct} from 'sentry/locale'; export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/starlette.tsx b/static/app/gettingStartedDocs/python/starlette.tsx index 857b250c4a325a..fbcfc06f7cee78 100644 --- a/static/app/gettingStartedDocs/python/starlette.tsx +++ b/static/app/gettingStartedDocs/python/starlette.tsx @@ -13,9 +13,7 @@ const introduction = tct( ); export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/python/tornado.tsx b/static/app/gettingStartedDocs/python/tornado.tsx index 423d85a5d98d80..3c8fa7779bce9d 100644 --- a/static/app/gettingStartedDocs/python/tornado.tsx +++ b/static/app/gettingStartedDocs/python/tornado.tsx @@ -18,9 +18,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description:

{tct('Install [code:sentry-sdk] from PyPI:', {code: })}

, diff --git a/static/app/gettingStartedDocs/python/tryton.tsx b/static/app/gettingStartedDocs/python/tryton.tsx index 27853d836e9963..b090a14bdb4b86 100644 --- a/static/app/gettingStartedDocs/python/tryton.tsx +++ b/static/app/gettingStartedDocs/python/tryton.tsx @@ -15,9 +15,7 @@ const introduction = ( export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.CONFIGURE, description: ( diff --git a/static/app/gettingStartedDocs/python/wsgi.tsx b/static/app/gettingStartedDocs/python/wsgi.tsx index 3cb90fc32f21d4..7fe3b4a7f000c4 100644 --- a/static/app/gettingStartedDocs/python/wsgi.tsx +++ b/static/app/gettingStartedDocs/python/wsgi.tsx @@ -9,9 +9,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/react-native/react-native.tsx b/static/app/gettingStartedDocs/react-native/react-native.tsx index 7a01a14c5ce7c4..da2983fd845f77 100644 --- a/static/app/gettingStartedDocs/react-native/react-native.tsx +++ b/static/app/gettingStartedDocs/react-native/react-native.tsx @@ -11,9 +11,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/ruby/rack.tsx b/static/app/gettingStartedDocs/ruby/rack.tsx index eaa7d72cea2bfc..b6b1e53fd1a82e 100644 --- a/static/app/gettingStartedDocs/ruby/rack.tsx +++ b/static/app/gettingStartedDocs/ruby/rack.tsx @@ -6,9 +6,7 @@ import {tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/ruby/rails.tsx b/static/app/gettingStartedDocs/ruby/rails.tsx index 896b402b7fd74a..99fa49bb758923 100644 --- a/static/app/gettingStartedDocs/ruby/rails.tsx +++ b/static/app/gettingStartedDocs/ruby/rails.tsx @@ -14,9 +14,7 @@ const introduction = ( ); export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/ruby/ruby.tsx b/static/app/gettingStartedDocs/ruby/ruby.tsx index ca47af80ab46b3..ad028f6beb5dfe 100644 --- a/static/app/gettingStartedDocs/ruby/ruby.tsx +++ b/static/app/gettingStartedDocs/ruby/ruby.tsx @@ -6,9 +6,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/gettingStartedDocs/rust/rust.tsx b/static/app/gettingStartedDocs/rust/rust.tsx index 006d344539bf26..d68643da4d5400 100644 --- a/static/app/gettingStartedDocs/rust/rust.tsx +++ b/static/app/gettingStartedDocs/rust/rust.tsx @@ -6,9 +6,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -22,9 +23,14 @@ export const steps = ({ configurations: [ { language: 'toml', + partialLoading: sourcePackageRegistries?.isLoading, code: ` [dependencies] -sentry = "0.31.5" +sentry = "${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.rust'] ?? '0.31.5' + }" `, }, ], @@ -76,8 +82,12 @@ fn main() { ]; // Configuration End -export function GettingStartedWithRust({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithRust({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithRust; diff --git a/static/app/gettingStartedDocs/unity/unity.tsx b/static/app/gettingStartedDocs/unity/unity.tsx index ed45d80806e485..f04a9376322c2c 100644 --- a/static/app/gettingStartedDocs/unity/unity.tsx +++ b/static/app/gettingStartedDocs/unity/unity.tsx @@ -11,9 +11,10 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ + sourcePackageRegistries, +}: Partial< + Pick +> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( @@ -31,7 +32,12 @@ export const steps = ({ configurations: [ { language: 'bash', - code: 'https://github.com/getsentry/unity.git#1.5.0', + partialLoading: sourcePackageRegistries?.isLoading, + code: `https://github.com/getsentry/unity.git#${ + sourcePackageRegistries?.isLoading + ? t('\u2026loading') + : sourcePackageRegistries?.data?.['sentry.dotnet.unity']?.version ?? '1.5.0' + }`, }, ], additionalInfo: ( @@ -120,8 +126,12 @@ SentrySdk.CaptureMessage("Test event"); ]; // Configuration End -export function GettingStartedWithUnity({dsn, ...props}: ModuleProps) { - return ; +export function GettingStartedWithUnity({ + dsn, + sourcePackageRegistries, + ...props +}: ModuleProps) { + return ; } export default GettingStartedWithUnity; diff --git a/static/app/gettingStartedDocs/unreal/unreal.tsx b/static/app/gettingStartedDocs/unreal/unreal.tsx index 212bf731b48f38..474068b6cf96a3 100644 --- a/static/app/gettingStartedDocs/unreal/unreal.tsx +++ b/static/app/gettingStartedDocs/unreal/unreal.tsx @@ -11,9 +11,7 @@ import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ dsn, -}: { - dsn?: string; -} = {}): LayoutProps['steps'] => [ +}: Partial> = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: ( diff --git a/static/app/views/onboarding/onboarding.spec.tsx b/static/app/views/onboarding/onboarding.spec.tsx index ca13169f3454d1..b129f79429c84c 100644 --- a/static/app/views/onboarding/onboarding.spec.tsx +++ b/static/app/views/onboarding/onboarding.spec.tsx @@ -85,6 +85,11 @@ describe('Onboarding', function () { }, }); + MockApiClient.addMockResponse({ + url: `/organizations/${organization.slug}/sdks/`, + body: {}, + }); + MockApiClient.addMockResponse({ url: `/projects/${organization.slug}/${nextJsProject.slug}/docs/javascript-nextjs-with-error-monitoring/`, body: null, @@ -170,6 +175,11 @@ describe('Onboarding', function () { }, }); + MockApiClient.addMockResponse({ + url: `/organizations/${organization.slug}/sdks/`, + body: {}, + }); + MockApiClient.addMockResponse({ url: `/projects/org-slug/${reactProject.slug}/`, body: [reactProject], @@ -260,6 +270,11 @@ describe('Onboarding', function () { }, }); + MockApiClient.addMockResponse({ + url: `/organizations/${organization.slug}/sdks/`, + body: {}, + }); + MockApiClient.addMockResponse({ url: `/projects/org-slug/${reactProject.slug}/`, body: [reactProject], diff --git a/static/app/views/onboarding/setupDocs.spec.tsx b/static/app/views/onboarding/setupDocs.spec.tsx index 7cc01ffac444d3..d7c4d5cddb1659 100644 --- a/static/app/views/onboarding/setupDocs.spec.tsx +++ b/static/app/views/onboarding/setupDocs.spec.tsx @@ -31,6 +31,20 @@ function renderMockRequests({ body: [], }); + MockApiClient.addMockResponse({ + url: `/organizations/${orgSlug}/sdks/`, + body: { + 'sentry.java': { + canonical: 'maven:io.sentry:sentry', + main_docs_url: 'https://docs.sentry.io/platforms/java', + name: 'io.sentry:sentry', + package_url: 'https://search.maven.org/artifact/io.sentry/sentry', + repo_url: 'https://github.com/getsentry/sentry-java', + version: '6.28.0', + }, + }, + }); + if (project.slug !== 'javascript-react') { MockApiClient.addMockResponse({ url: `/projects/${orgSlug}/${project.slug}/docs/${project.platform}/`, @@ -88,6 +102,48 @@ describe('Onboarding Setup Docs', function () { ).not.toBeInTheDocument(); }); + it('renders SDK version from the sentry release registry', async function () { + const {router, route, routerContext, organization, project} = initializeOrg({ + projects: [ + { + ...initializeOrg().project, + slug: 'java', + platform: 'java', + }, + ], + }); + + ProjectsStore.init(); + ProjectsStore.loadInitialData([project]); + + renderMockRequests({project, orgSlug: organization.slug}); + + render( + + {}} + stepIndex={2} + router={router} + route={route} + location={router.location} + genSkipOnboardingLink={() => ''} + orgId={organization.slug} + search="" + recentCreatedProject={project} + /> + , + { + context: routerContext, + organization, + } + ); + + expect( + await screen.findByText(/implementation 'io.sentry:sentry:6.28.0'/) + ).toBeInTheDocument(); + }); + describe('renders Product Selection', function () { it('all products checked', async function () { const {router, route, routerContext, organization, project} = initializeOrg({