完成全项目响应式审核与换机交接

This commit is contained in:
2026-07-22 07:41:27 +08:00
parent a127280ce6
commit eced3d1e6e
77 changed files with 2052 additions and 378 deletions
+24
View File
@@ -0,0 +1,24 @@
$ErrorActionPreference = 'Stop'
$owner = 'utils/validation.js'
if (-not (Test-Path $owner)) { throw 'Missing shared password policy owner' }
$validation = Get-Content $owner -Raw -Encoding UTF8
foreach ($token in @('export const PASSWORD_POLICY_MESSAGE', 'export const validatePassword')) {
if (-not $validation.Contains($token)) { throw "Password policy owner missing: $token" }
}
foreach ($page in @(
'pages/auth/a04-register.vue',
'pages/auth/a05-reset-password.vue',
'pages/profile/m04-change-password.vue'
)) {
$source = Get-Content $page -Raw -Encoding UTF8
foreach ($token in @('validatePassword', 'PASSWORD_POLICY_MESSAGE', '@/utils/validation.js')) {
if (-not $source.Contains($token)) { throw "$page does not consume shared password policy: $token" }
}
if ($source -match '\(\?=\.\*\[A-Za-z\]\)|\{8,32\}\$') {
throw "$page must not own a local password policy regex"
}
}
Write-Output 'PASSWORD-POLICY-CONTRACT PASS'