@cloudbase/cloudbase-mcp 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/auth.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AuthSupevisor } from '@cloudbase/toolbox';
2
2
  const auth = AuthSupevisor.getInstance({});
3
- export async function getCreatial() {
3
+ export async function getLoginState() {
4
4
  const { TENCENTCLOUD_SECRETID, TENCENTCLOUD_SECRETKEY, TENCENTCLOUD_SESSIONTOKEN } = process.env;
5
5
  if (TENCENTCLOUD_SECRETID && TENCENTCLOUD_SECRETKEY) {
6
6
  await auth.loginByApiSecret(TENCENTCLOUD_SECRETID, TENCENTCLOUD_SECRETKEY, TENCENTCLOUD_SESSIONTOKEN);
@@ -1,10 +1,10 @@
1
1
  import CloudBase from "@cloudbase/manager-node";
2
- import { getCreatial } from './auth.js';
2
+ import { getLoginState } from './auth.js';
3
3
  export async function getCloudBaseManager() {
4
- const loginState = await getCreatial();
4
+ const loginState = await getLoginState();
5
5
  const { envId, secretId, secretKey, token } = loginState;
6
6
  const cloudbase = new CloudBase({
7
- envId,
7
+ envId: process.env.CLOUDBASE_ENV_ID || envId,
8
8
  secretId,
9
9
  secretKey,
10
10
  token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cloudbase-mcp",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "腾讯云开发 MCP Server,支持静态托管/环境查询/",
5
5
  "main": "index.js",
6
6
  "type": "module",