File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " esa-cli" ,
3- "version" : " 1.0.6 " ,
3+ "version" : " 1.0.8-beta.2 " ,
44 "description" : " A CLI for operating Alibaba Cloud ESA Functions and Pages." ,
55 "main" : " bin/enter.cjs" ,
66 "type" : " module" ,
Original file line number Diff line number Diff line change @@ -17,7 +17,11 @@ import {
1717} from '../libs/interface.js' ;
1818import logger from '../libs/logger.js' ;
1919import { getRoot } from '../utils/fileUtils/base.js' ;
20- import { getCliConfig , projectConfigPath } from '../utils/fileUtils/index.js' ;
20+ import {
21+ getApiConfig ,
22+ getCliConfig ,
23+ projectConfigPath
24+ } from '../utils/fileUtils/index.js' ;
2125import { validateCredentials } from '../utils/validateCredentials.js' ;
2226
2327import { getRoutineDetails } from './common/utils.js' ;
@@ -120,13 +124,16 @@ export async function checkIsLoginSuccess(): Promise<boolean> {
120124 accessKeySecret
121125 } ;
122126 if ( securityToken ) auth . securityToken = securityToken ;
127+ // 使用配置文件/项目里的 endpoint,避免 validateCredentials 探测到的公网域名
128+ //(如 esa.cn-hangzhou)覆盖用户显式配置的预发等地址
129+ const fileConfig = getApiConfig ( ) ;
123130 server . updateConfig ( {
124- auth ,
125- endpoint : result . endpoint
131+ ... fileConfig ,
132+ auth
126133 } ) ;
127134 api . updateConfig ( {
128- auth ,
129- endpoint : result . endpoint
135+ ... fileConfig ,
136+ auth
130137 } ) ;
131138 return true ;
132139 }
You can’t perform that action at this time.
0 commit comments