完成70%
This commit is contained in:
@@ -23,7 +23,7 @@ foreach ($method in @('getCurrentGenealogyId', 'setCurrentGenealogyId', 'clearCu
|
||||
}
|
||||
|
||||
$api = Get-Content -Raw -Encoding UTF8 (Join-Path $root 'utils/api.js')
|
||||
foreach ($method in @('unwrapResponse', 'getCaptchaRequirement', 'sendSmsCode', 'loginWithPassword', 'loginWithSms', 'registerWithPassword', 'resetPassword')) {
|
||||
foreach ($method in @('unwrapResponse', 'getCaptchaRequirement', 'sendSmsCode', 'loginWithPassword', 'loginWithSms', 'registerWithPassword', 'resetPassword', 'changePassword', 'logout')) {
|
||||
if ($api -notmatch [regex]::Escape($method)) {
|
||||
throw "Missing auth API method: $method"
|
||||
}
|
||||
@@ -71,8 +71,8 @@ if ($api -match 'mock-session-token|mockResult') { throw '认证链路不得生
|
||||
if (([regex]::Matches($api, "return saveLogin\(result\)")).Count -ne 3) {
|
||||
throw '密码登录、短信登录与注册必须共用唯一 AppLoginVo 会话适配器'
|
||||
}
|
||||
if ($api -notmatch 'import \{ hasRemoteConfig, resolveRuntimeMode, runtimeConfig \}' -or ([regex]::Matches($api, 'requireRemoteAuth\(\)')).Count -ne 6) {
|
||||
throw '六个认证传输必须通过共享运行模式解析器失败关闭'
|
||||
if ($api -notmatch 'import \{ hasRemoteConfig, resolveRuntimeMode, runtimeConfig \}' -or ([regex]::Matches($api, 'requireRemoteAuth\(\)')).Count -ne 7) {
|
||||
throw '七个认证传输必须通过共享运行模式解析器失败关闭'
|
||||
}
|
||||
if ($api -match 'if \(isMockMode\(\)\)') {
|
||||
throw 'Auth transports must not treat every non-mock mode as remote'
|
||||
|
||||
Reference in New Issue
Block a user