File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { AuthSupevisor } from '@cloudbase/toolbox'
33const auth = AuthSupevisor . getInstance ( {
44} )
55
6- export async function getCreatial ( ) {
6+ export async function getLoginState ( ) {
77 const {
88 TENCENTCLOUD_SECRETID ,
99 TENCENTCLOUD_SECRETKEY ,
Original file line number Diff line number Diff line change 11import CloudBase from "@cloudbase/manager-node" ;
2- import { getCreatial } from './auth.js'
2+ import { getLoginState } from './auth.js'
33
44export async function getCloudBaseManager ( ) {
5- const loginState = await getCreatial ( )
5+ const loginState = await getLoginState ( )
66 const {
77 envId,
88 secretId,
99 secretKey,
1010 token
1111 } = loginState
12+
1213 const cloudbase = new CloudBase ( {
13- envId,
14+ envId : process . env . CLOUDBASE_ENV_ID || envId ,
1415 secretId,
1516 secretKey,
1617 token
You can’t perform that action at this time.
0 commit comments