13 lines
890 B
PowerShell
13 lines
890 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$page = Get-Content -LiteralPath (Join-Path $root 'pages/profile/m01-profile-home.vue') -Raw -Encoding UTF8
|
|
foreach ($routeKey in @('routeKey: "M08"', 'routeKey: "M09"')) {
|
|
if (-not $page.Contains($routeKey)) { throw "M01 service entry missing: $routeKey" }
|
|
}
|
|
if (-not $page.Contains('openPage(item.routeKey, {}, "M01")')) { throw 'M01 service entries must use the registered gateway with M01 as source' }
|
|
foreach ($forbidden in @('/pages/profile/', 'uni.navigateTo', 'uni.navigateBack', 'uni.redirectTo', 'uni.reLaunch')) {
|
|
if ($page.Contains($forbidden)) { throw "M01 service entry bypasses the navigation gateway: $forbidden" }
|
|
}
|
|
if ($page -match '(?s)\.profile-hero\s*\{[^}]*overflow:\s*hidden') { throw 'M01 profile hero must not clip expanded identity copy' }
|
|
Write-Output 'M01-SERVICE-ENTRY-CONTRACT PASS'
|