完善联调标准化与诊断链路
This commit is contained in:
@@ -9,6 +9,17 @@ export interface GameConfigLaunchRequest {
|
||||
routeCode?: string | null
|
||||
}
|
||||
|
||||
export interface GameResolvedReleaseLaunchContext {
|
||||
launchMode?: string | null
|
||||
source?: string | null
|
||||
eventId?: string | null
|
||||
releaseId?: string | null
|
||||
configLabel?: string | null
|
||||
manifestUrl?: string | null
|
||||
manifestChecksumSha256?: string | null
|
||||
routeCode?: string | null
|
||||
}
|
||||
|
||||
export interface BusinessLaunchContext {
|
||||
source: BusinessLaunchSource
|
||||
competitionId?: string | null
|
||||
@@ -56,6 +67,7 @@ export interface GameContentBundleLaunchContext {
|
||||
export interface GameLaunchEnvelope {
|
||||
config: GameConfigLaunchRequest
|
||||
business: BusinessLaunchContext | null
|
||||
resolvedRelease?: GameResolvedReleaseLaunchContext | null
|
||||
variant?: GameVariantLaunchContext | null
|
||||
runtime?: GameRuntimeLaunchContext | null
|
||||
presentation?: GamePresentationLaunchContext | null
|
||||
@@ -65,6 +77,7 @@ export interface GameLaunchEnvelope {
|
||||
export interface MapPageLaunchOptions {
|
||||
launchId?: string
|
||||
recoverSession?: string
|
||||
autoStartOnEnter?: string
|
||||
preset?: string
|
||||
configUrl?: string
|
||||
configLabel?: string
|
||||
@@ -292,6 +305,7 @@ export function getDemoGameLaunchEnvelope(preset: DemoGamePreset = 'classic'): G
|
||||
business: {
|
||||
source: 'demo',
|
||||
},
|
||||
resolvedRelease: null,
|
||||
variant: null,
|
||||
runtime: null,
|
||||
presentation: null,
|
||||
@@ -324,12 +338,24 @@ export function consumePendingGameLaunchEnvelope(launchId: string): GameLaunchEn
|
||||
return envelope
|
||||
}
|
||||
|
||||
export function buildMapPageUrlWithLaunchId(launchId: string): string {
|
||||
return `/pages/map/map?launchId=${encodeURIComponent(launchId)}`
|
||||
export function buildMapPageUrlWithLaunchId(launchId: string, extraQuery?: Record<string, string>): string {
|
||||
const queryParts = [`launchId=${encodeURIComponent(launchId)}`]
|
||||
if (extraQuery) {
|
||||
Object.keys(extraQuery).forEach((key) => {
|
||||
const value = extraQuery[key]
|
||||
if (typeof value === 'string' && value) {
|
||||
queryParts.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
return `/pages/map/map?${queryParts.join('&')}`
|
||||
}
|
||||
|
||||
export function prepareMapPageUrlForLaunch(envelope: GameLaunchEnvelope): string {
|
||||
return buildMapPageUrlWithLaunchId(stashPendingGameLaunchEnvelope(envelope))
|
||||
return buildMapPageUrlWithLaunchId(
|
||||
stashPendingGameLaunchEnvelope(envelope),
|
||||
{ autoStartOnEnter: '1' },
|
||||
)
|
||||
}
|
||||
|
||||
export function prepareMapPageUrlForRecovery(envelope: GameLaunchEnvelope): string {
|
||||
@@ -367,6 +393,7 @@ export function resolveGameLaunchEnvelope(options?: MapPageLaunchOptions | null)
|
||||
routeCode: normalizeOptionalString(options ? options.routeCode : undefined),
|
||||
},
|
||||
business: buildBusinessLaunchContext(options),
|
||||
resolvedRelease: null,
|
||||
variant: buildVariantLaunchContext(options),
|
||||
runtime: buildRuntimeLaunchContext(options),
|
||||
presentation: buildPresentationLaunchContext(options),
|
||||
|
||||
Reference in New Issue
Block a user