@cloudbase/manager-node 5.6.5 → 5.6.7
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/CHANGELOG.md +30 -0
- package/lib/access/index.js +5 -0
- package/lib/cloudApp/index.js +10 -1
- package/lib/cloudrun/index.js +97 -0
- package/lib/index.js +4 -0
- package/package.json +1 -1
- package/types/access/index.d.ts +5 -0
- package/types/cloudApp/types.d.ts +17 -0
- package/types/cloudrun/index.d.ts +36 -1
- package/types/cloudrun/type.d.ts +130 -0
- package/types/index.d.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
## @cloudbase/manager-node v5.6.6 版本发布 🚀(2026-07-31)
|
|
2
|
+
|
|
3
|
+
- 新增 uploadCode 新增 onPhase 分步计时回调
|
|
4
|
+
- 优化 标记 HTTP Service (CloudBaseGW) 模块自 v5.0.0 起废弃,并添加迁移指引
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## @cloudbase/manager-node v5.6.5 版本发布 🚀(2026-07-28)
|
|
9
|
+
|
|
10
|
+
- 新增 PostgreSQL 数据库迁移相关 API 与类型定义
|
|
11
|
+
- 新增 统一 SCF/TCBR Agent 日志查询走 CLS searchClsLog
|
|
12
|
+
- 新增 code 入参并完善相关文档与测试
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## @cloudbase/manager-node v5.6.4 版本发布 🚀(2026-07-23)
|
|
17
|
+
|
|
18
|
+
- 新增 code 入参并完善相关文档与测试
|
|
19
|
+
- 重构 更新默认 Runtime 为 Nodejs20.19
|
|
20
|
+
- 修复 移除创建云函数时 Timeout 默认值,改为透传 SCF 默认值
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## @cloudbase/manager-node v5.6.3 版本发布 🚀(2026-07-16)
|
|
25
|
+
|
|
26
|
+
- 重构 更新默认 Runtime 为 Nodejs20.19
|
|
27
|
+
- 修复 移除创建云函数时 Timeout 默认值,改为透传 SCF 默认值
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
1
31
|
## @cloudbase/manager-node v5.6.2 版本发布 🚀(2026-07-09)
|
|
2
32
|
|
|
3
33
|
- 新增 支持镜像部署模式
|
package/lib/access/index.js
CHANGED
|
@@ -8,6 +8,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.AccessService = void 0;
|
|
10
10
|
const utils_1 = require("../utils");
|
|
11
|
+
/**
|
|
12
|
+
* HTTP Service(CloudBaseGW)访问服务。
|
|
13
|
+
* 注意:HTTP Service 模块自 v5.0.0 起已废弃,建议迁移到 EnvService 的域名与路由能力
|
|
14
|
+
* (如 createHttpServiceRoute / modifyHttpServiceRoute / deleteHttpServiceRoute)。
|
|
15
|
+
*/
|
|
11
16
|
class AccessService {
|
|
12
17
|
constructor(environment) {
|
|
13
18
|
this.environment = environment;
|
package/lib/cloudApp/index.js
CHANGED
|
@@ -126,7 +126,7 @@ class CloudAppService {
|
|
|
126
126
|
* @param params 上传参数
|
|
127
127
|
*/
|
|
128
128
|
async uploadCode(params) {
|
|
129
|
-
const { serviceName, localPath, ignore = [] } = params;
|
|
129
|
+
const { serviceName, localPath, ignore = [], onPhase } = params;
|
|
130
130
|
// 1. 验证本地路径
|
|
131
131
|
if (!fs_1.default.existsSync(localPath)) {
|
|
132
132
|
throw new error_1.CloudBaseError(`本地路径不存在: ${localPath}`);
|
|
@@ -138,20 +138,27 @@ class CloudAppService {
|
|
|
138
138
|
// 2. 打包本地文件为 ZIP
|
|
139
139
|
const tmpZipPath = path_1.default.join(os_1.default.tmpdir(), `cloudapp-${Date.now()}-${Math.random().toString(36).slice(2)}.zip`);
|
|
140
140
|
const defaultIgnore = ['node_modules/**', '.git/**', '.DS_Store', '**/.DS_Store'];
|
|
141
|
+
const packStart = Date.now();
|
|
141
142
|
await (0, utils_1.compressToZip)({
|
|
142
143
|
dirPath: localPath,
|
|
143
144
|
outputPath: tmpZipPath,
|
|
144
145
|
ignore: [...defaultIgnore, ...ignore]
|
|
145
146
|
});
|
|
147
|
+
const zipSize = fs_1.default.statSync(tmpZipPath).size;
|
|
148
|
+
onPhase === null || onPhase === void 0 ? void 0 : onPhase({ phase: 'pack', durationMs: Date.now() - packStart, bytes: zipSize });
|
|
146
149
|
try {
|
|
147
150
|
// 3. 获取上传凭证
|
|
151
|
+
const credStart = Date.now();
|
|
148
152
|
const cosInfo = await this.describeCosInfo({
|
|
149
153
|
deployType: params.deployType,
|
|
150
154
|
serviceName,
|
|
151
155
|
suffix: '.zip'
|
|
152
156
|
});
|
|
157
|
+
onPhase === null || onPhase === void 0 ? void 0 : onPhase({ phase: 'credential', durationMs: Date.now() - credStart });
|
|
153
158
|
// 4. 读取 ZIP 文件
|
|
159
|
+
const readStart = Date.now();
|
|
154
160
|
const zipBuffer = fs_1.default.readFileSync(tmpZipPath);
|
|
161
|
+
onPhase === null || onPhase === void 0 ? void 0 : onPhase({ phase: 'read', durationMs: Date.now() - readStart, bytes: zipBuffer.length });
|
|
155
162
|
// 5. 构建请求头
|
|
156
163
|
const headers = {
|
|
157
164
|
'Content-Type': 'application/zip'
|
|
@@ -162,6 +169,7 @@ class CloudAppService {
|
|
|
162
169
|
}
|
|
163
170
|
}
|
|
164
171
|
// 6. 使用预签名 URL 上传
|
|
172
|
+
const putStart = Date.now();
|
|
165
173
|
const response = await (0, http_request_1.fetchStream)(cosInfo.UploadUrl, {
|
|
166
174
|
method: 'PUT',
|
|
167
175
|
body: zipBuffer,
|
|
@@ -178,6 +186,7 @@ class CloudAppService {
|
|
|
178
186
|
}
|
|
179
187
|
throw new error_1.CloudBaseError(`上传失败: ${response.status} ${response.statusText}${errorDetail}`);
|
|
180
188
|
}
|
|
189
|
+
onPhase === null || onPhase === void 0 ? void 0 : onPhase({ phase: 'upload', durationMs: Date.now() - putStart, bytes: zipBuffer.length });
|
|
181
190
|
// 7. 返回结果(返回 cosTimestamp,用于创建应用)
|
|
182
191
|
return {
|
|
183
192
|
cosTimestamp: cosInfo.UnixTimestamp,
|
package/lib/cloudrun/index.js
CHANGED
|
@@ -88,6 +88,19 @@ class CloudRunService {
|
|
|
88
88
|
throw new Error(`云托管代码下载地址为空(请求ID: ${cloudBaseBuildServiceRes.RequestId})`);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* 查询服务管理任务信息
|
|
93
|
+
* @param {Object} params 查询参数
|
|
94
|
+
* @param {string} params.serverName 服务名
|
|
95
|
+
* @param {number} [params.taskId=0] 任务 ID,传 0 表示查询该服务当前最新的任务
|
|
96
|
+
* @param {string} [params.operatorRemark] 操作标识
|
|
97
|
+
* @returns {Promise<{ IsExist?: boolean; Task?: IServerManageTaskInfo; RequestId?: string }>} 任务是否存在及任务信息
|
|
98
|
+
*/
|
|
99
|
+
async describeServerManageTask(params) {
|
|
100
|
+
var _a;
|
|
101
|
+
const envConfig = this.environment.lazyEnvironmentConfig;
|
|
102
|
+
return this.tcbrService.request('DescribeServerManageTask', Object.assign({ EnvId: envConfig.EnvId, ServerName: params.serverName, TaskId: (_a = params.taskId) !== null && _a !== void 0 ? _a : 0 }, (params.operatorRemark ? { OperatorRemark: params.operatorRemark } : {})));
|
|
103
|
+
}
|
|
91
104
|
/**
|
|
92
105
|
* 获取云托管服务列表
|
|
93
106
|
* @param {Object} [params] 查询参数
|
|
@@ -197,6 +210,78 @@ class CloudRunService {
|
|
|
197
210
|
OperateType: 'go_back',
|
|
198
211
|
});
|
|
199
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* 回滚版本(SubmitServerRollback)
|
|
215
|
+
* @param {ISubmitServerRollbackParams} params 回滚参数(服务名、当前版本名、目标回滚版本名)
|
|
216
|
+
* @returns {Promise<ISubmitServerRollbackResponse>} 返回任务 ID 和请求 ID
|
|
217
|
+
*/
|
|
218
|
+
async submitServerRollback(params) {
|
|
219
|
+
var _a, _b, _c, _d;
|
|
220
|
+
const envConfig = this.environment.lazyEnvironmentConfig;
|
|
221
|
+
const serverName = (_a = params === null || params === void 0 ? void 0 : params.ServerName) === null || _a === void 0 ? void 0 : _a.trim();
|
|
222
|
+
const currentVersionName = (_b = params === null || params === void 0 ? void 0 : params.CurrentVersionName) === null || _b === void 0 ? void 0 : _b.trim();
|
|
223
|
+
const rollbackVersionName = (_c = params === null || params === void 0 ? void 0 : params.RollbackVersionName) === null || _c === void 0 ? void 0 : _c.trim();
|
|
224
|
+
const operatorRemark = (_d = params === null || params === void 0 ? void 0 : params.OperatorRemark) === null || _d === void 0 ? void 0 : _d.trim();
|
|
225
|
+
if (!serverName) {
|
|
226
|
+
throw new Error('Missing required parameters: ServerName');
|
|
227
|
+
}
|
|
228
|
+
if (!currentVersionName) {
|
|
229
|
+
throw new Error('Missing required parameters: CurrentVersionName');
|
|
230
|
+
}
|
|
231
|
+
if (!rollbackVersionName) {
|
|
232
|
+
throw new Error('Missing required parameters: RollbackVersionName');
|
|
233
|
+
}
|
|
234
|
+
return this.tcbrService.request('SubmitServerRollback', Object.assign({ EnvId: envConfig.EnvId, ServerName: serverName, CurrentVersionName: currentVersionName, RollbackVersionName: rollbackVersionName }, (operatorRemark ? { OperatorRemark: operatorRemark } : {})));
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* 批量删除版本
|
|
238
|
+
* @param {IDeleteCloudRunVersionsParams} params 删除参数
|
|
239
|
+
* @returns {Promise<IDeleteCloudRunVersionsResponse>} 删除结果
|
|
240
|
+
*/
|
|
241
|
+
async deleteCloudRunVersions(params) {
|
|
242
|
+
var _a;
|
|
243
|
+
const envConfig = this.environment.lazyEnvironmentConfig;
|
|
244
|
+
const operatorRemark = (_a = params === null || params === void 0 ? void 0 : params.OperatorRemark) === null || _a === void 0 ? void 0 : _a.trim();
|
|
245
|
+
if (!Array.isArray(params === null || params === void 0 ? void 0 : params.SimpleVersions) || params.SimpleVersions.length === 0) {
|
|
246
|
+
throw new Error('Missing required parameters: SimpleVersions');
|
|
247
|
+
}
|
|
248
|
+
const simpleVersions = params.SimpleVersions.map((item, index) => {
|
|
249
|
+
var _a, _b, _c;
|
|
250
|
+
const serverName = (_a = item === null || item === void 0 ? void 0 : item.ServerName) === null || _a === void 0 ? void 0 : _a.trim();
|
|
251
|
+
const versionName = (_b = item === null || item === void 0 ? void 0 : item.VersionName) === null || _b === void 0 ? void 0 : _b.trim();
|
|
252
|
+
if (!serverName) {
|
|
253
|
+
throw new Error(`Invalid SimpleVersions[${index}].ServerName`);
|
|
254
|
+
}
|
|
255
|
+
if (!versionName) {
|
|
256
|
+
throw new Error(`Invalid SimpleVersions[${index}].VersionName`);
|
|
257
|
+
}
|
|
258
|
+
return {
|
|
259
|
+
EnvId: ((_c = item === null || item === void 0 ? void 0 : item.EnvId) === null || _c === void 0 ? void 0 : _c.trim()) || envConfig.EnvId,
|
|
260
|
+
ServerName: serverName,
|
|
261
|
+
VersionName: versionName
|
|
262
|
+
};
|
|
263
|
+
});
|
|
264
|
+
return this.tcbrService.request('DeleteCloudRunVersions', Object.assign({ EnvId: envConfig.EnvId, IsDeleteServer: params.IsDeleteServer, IsDeleteImage: params.IsDeleteImage, SimpleVersions: simpleVersions }, (operatorRemark ? { OperatorRemark: operatorRemark } : {})));
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* 查询版本详情
|
|
268
|
+
* @param {IDescribeVersionDetailParams} params 查询参数(服务名、版本名、可选渠道)
|
|
269
|
+
* @returns {Promise<IDescribeVersionDetailResponse>} 版本详情
|
|
270
|
+
*/
|
|
271
|
+
async describeVersionDetail(params) {
|
|
272
|
+
var _a, _b, _c;
|
|
273
|
+
const envConfig = this.environment.lazyEnvironmentConfig;
|
|
274
|
+
const serverName = (_a = params === null || params === void 0 ? void 0 : params.ServerName) === null || _a === void 0 ? void 0 : _a.trim();
|
|
275
|
+
const versionName = (_b = params === null || params === void 0 ? void 0 : params.VersionName) === null || _b === void 0 ? void 0 : _b.trim();
|
|
276
|
+
const channel = (_c = params === null || params === void 0 ? void 0 : params.Channel) === null || _c === void 0 ? void 0 : _c.trim();
|
|
277
|
+
if (!serverName) {
|
|
278
|
+
throw new Error('Missing required parameters: ServerName');
|
|
279
|
+
}
|
|
280
|
+
if (!versionName) {
|
|
281
|
+
throw new Error('Missing required parameters: VersionName');
|
|
282
|
+
}
|
|
283
|
+
return this.tcbrService.request('DescribeVersionDetail', Object.assign({ EnvId: envConfig.EnvId, ServerName: serverName, VersionName: versionName }, (channel ? { Channel: channel } : {})));
|
|
284
|
+
}
|
|
200
285
|
/**
|
|
201
286
|
*查询云托管服务详情
|
|
202
287
|
* @param {Object} params 查询参数
|
|
@@ -433,6 +518,9 @@ __decorate([
|
|
|
433
518
|
__decorate([
|
|
434
519
|
(0, utils_1.preLazy)()
|
|
435
520
|
], CloudRunService.prototype, "download", null);
|
|
521
|
+
__decorate([
|
|
522
|
+
(0, utils_1.preLazy)()
|
|
523
|
+
], CloudRunService.prototype, "describeServerManageTask", null);
|
|
436
524
|
__decorate([
|
|
437
525
|
(0, utils_1.preLazy)()
|
|
438
526
|
], CloudRunService.prototype, "list", null);
|
|
@@ -445,6 +533,15 @@ __decorate([
|
|
|
445
533
|
__decorate([
|
|
446
534
|
(0, utils_1.preLazy)()
|
|
447
535
|
], CloudRunService.prototype, "rollback", null);
|
|
536
|
+
__decorate([
|
|
537
|
+
(0, utils_1.preLazy)()
|
|
538
|
+
], CloudRunService.prototype, "submitServerRollback", null);
|
|
539
|
+
__decorate([
|
|
540
|
+
(0, utils_1.preLazy)()
|
|
541
|
+
], CloudRunService.prototype, "deleteCloudRunVersions", null);
|
|
542
|
+
__decorate([
|
|
543
|
+
(0, utils_1.preLazy)()
|
|
544
|
+
], CloudRunService.prototype, "describeVersionDetail", null);
|
|
448
545
|
__decorate([
|
|
449
546
|
(0, utils_1.preLazy)()
|
|
450
547
|
], CloudRunService.prototype, "detail", null);
|
package/lib/index.js
CHANGED
|
@@ -64,6 +64,10 @@ class CloudBase {
|
|
|
64
64
|
get hosting() {
|
|
65
65
|
return this.currentEnvironment().getHostingService();
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* HTTP Service(CloudBaseGW)访问服务
|
|
69
|
+
* @deprecated 自 v5.0.0 起 HTTP Service 模块已废弃,请改用 env 下的域名与路由相关 API。
|
|
70
|
+
*/
|
|
67
71
|
get access() {
|
|
68
72
|
return this.currentEnvironment().getAccessService();
|
|
69
73
|
}
|
package/package.json
CHANGED
package/types/access/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Environment } from '../environment';
|
|
2
2
|
import { ICreateAccessOptions, IApi, IUpdateOptions, IService, IDeleteOptions, IGetOptions, IDomainOptions } from './types';
|
|
3
3
|
import { IResponseInfo } from '../interfaces';
|
|
4
|
+
/**
|
|
5
|
+
* HTTP Service(CloudBaseGW)访问服务。
|
|
6
|
+
* 注意:HTTP Service 模块自 v5.0.0 起已废弃,建议迁移到 EnvService 的域名与路由能力
|
|
7
|
+
* (如 createHttpServiceRoute / modifyHttpServiceRoute / deleteHttpServiceRoute)。
|
|
8
|
+
*/
|
|
4
9
|
export declare class AccessService {
|
|
5
10
|
private tcbService;
|
|
6
11
|
private environment;
|
|
@@ -299,6 +299,21 @@ export interface IProgressData {
|
|
|
299
299
|
total: number;
|
|
300
300
|
percent: number;
|
|
301
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* 代码上传的分步阶段
|
|
304
|
+
*/
|
|
305
|
+
export type UploadPhase = 'pack' | 'credential' | 'read' | 'upload';
|
|
306
|
+
/**
|
|
307
|
+
* 单个阶段计时信息(由 uploadCode 的 onPhase 回调触发)
|
|
308
|
+
*/
|
|
309
|
+
export interface IUploadPhaseTiming {
|
|
310
|
+
/** 阶段名 */
|
|
311
|
+
phase: UploadPhase;
|
|
312
|
+
/** 耗时(ms) */
|
|
313
|
+
durationMs: number;
|
|
314
|
+
/** 字节数(pack: zip 大小; read/upload: buffer 大小) */
|
|
315
|
+
bytes?: number;
|
|
316
|
+
}
|
|
302
317
|
/**
|
|
303
318
|
* 上传代码参数
|
|
304
319
|
*/
|
|
@@ -313,6 +328,8 @@ export interface IUploadCloudAppCodeParams {
|
|
|
313
328
|
ignore?: string[];
|
|
314
329
|
/** 进度回调 */
|
|
315
330
|
onProgress?: (progress: IProgressData) => void;
|
|
331
|
+
/** 分步计时回调(各阶段完成时触发,用于 verbose 模式输出耗时) */
|
|
332
|
+
onPhase?: (timing: IUploadPhaseTiming) => void;
|
|
316
333
|
}
|
|
317
334
|
/**
|
|
318
335
|
* 上传代码结果
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Environment } from '../environment';
|
|
2
2
|
import { IResponseInfo } from '../interfaces';
|
|
3
|
-
import { CloudrunServerType, ICloudrunDetailResponse, ICloudrunListResponse, ICloudrunServerBaseConfig, ICreateVpcInfo, IBuildLogResponse, IProcessLogResponse, IDiffConfigItem, ITemplate, ReleaseTypeEnum, IDescribeCloudRunDeployRecordResponse } from './type';
|
|
3
|
+
import { CloudrunServerType, ICloudrunDetailResponse, ICloudrunListResponse, ICloudrunServerBaseConfig, ICreateVpcInfo, IBuildLogResponse, IProcessLogResponse, IDiffConfigItem, ITemplate, ReleaseTypeEnum, IServerManageTaskInfo, IDescribeCloudRunDeployRecordResponse, IDescribeVersionDetailParams, IDescribeVersionDetailResponse, ISubmitServerRollbackParams, ISubmitServerRollbackResponse, IDeleteCloudRunVersionsParams, IDeleteCloudRunVersionsResponse } from './type';
|
|
4
4
|
/**
|
|
5
5
|
* 云托管服务管理类
|
|
6
6
|
* 提供云托管服务的初始化、下载、列表查询和删除等功能
|
|
@@ -41,6 +41,23 @@ export declare class CloudRunService {
|
|
|
41
41
|
serverName: string;
|
|
42
42
|
targetPath: string;
|
|
43
43
|
}): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* 查询服务管理任务信息
|
|
46
|
+
* @param {Object} params 查询参数
|
|
47
|
+
* @param {string} params.serverName 服务名
|
|
48
|
+
* @param {number} [params.taskId=0] 任务 ID,传 0 表示查询该服务当前最新的任务
|
|
49
|
+
* @param {string} [params.operatorRemark] 操作标识
|
|
50
|
+
* @returns {Promise<{ IsExist?: boolean; Task?: IServerManageTaskInfo; RequestId?: string }>} 任务是否存在及任务信息
|
|
51
|
+
*/
|
|
52
|
+
describeServerManageTask(params: {
|
|
53
|
+
serverName: string;
|
|
54
|
+
taskId?: number;
|
|
55
|
+
operatorRemark?: string;
|
|
56
|
+
}): Promise<{
|
|
57
|
+
IsExist?: boolean;
|
|
58
|
+
Task?: IServerManageTaskInfo;
|
|
59
|
+
RequestId?: string;
|
|
60
|
+
}>;
|
|
44
61
|
/**
|
|
45
62
|
* 获取云托管服务列表
|
|
46
63
|
* @param {Object} [params] 查询参数
|
|
@@ -82,6 +99,24 @@ export declare class CloudRunService {
|
|
|
82
99
|
rollback(serverName: string): Promise<{
|
|
83
100
|
RequestId?: string;
|
|
84
101
|
}>;
|
|
102
|
+
/**
|
|
103
|
+
* 回滚版本(SubmitServerRollback)
|
|
104
|
+
* @param {ISubmitServerRollbackParams} params 回滚参数(服务名、当前版本名、目标回滚版本名)
|
|
105
|
+
* @returns {Promise<ISubmitServerRollbackResponse>} 返回任务 ID 和请求 ID
|
|
106
|
+
*/
|
|
107
|
+
submitServerRollback(params: ISubmitServerRollbackParams): Promise<ISubmitServerRollbackResponse>;
|
|
108
|
+
/**
|
|
109
|
+
* 批量删除版本
|
|
110
|
+
* @param {IDeleteCloudRunVersionsParams} params 删除参数
|
|
111
|
+
* @returns {Promise<IDeleteCloudRunVersionsResponse>} 删除结果
|
|
112
|
+
*/
|
|
113
|
+
deleteCloudRunVersions(params: IDeleteCloudRunVersionsParams): Promise<IDeleteCloudRunVersionsResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* 查询版本详情
|
|
116
|
+
* @param {IDescribeVersionDetailParams} params 查询参数(服务名、版本名、可选渠道)
|
|
117
|
+
* @returns {Promise<IDescribeVersionDetailResponse>} 版本详情
|
|
118
|
+
*/
|
|
119
|
+
describeVersionDetail(params: IDescribeVersionDetailParams): Promise<IDescribeVersionDetailResponse>;
|
|
85
120
|
/**
|
|
86
121
|
*查询云托管服务详情
|
|
87
122
|
* @param {Object} params 查询参数
|
package/types/cloudrun/type.d.ts
CHANGED
|
@@ -426,6 +426,136 @@ export interface IReleaseOrderInfo {
|
|
|
426
426
|
CreateTime?: string;
|
|
427
427
|
IsReleasing?: boolean;
|
|
428
428
|
}
|
|
429
|
+
/**
|
|
430
|
+
* DescribeVersionDetail 请求参数
|
|
431
|
+
*/
|
|
432
|
+
export interface IDescribeVersionDetailParams {
|
|
433
|
+
/** 服务名 */
|
|
434
|
+
ServerName: string;
|
|
435
|
+
/** 版本名 */
|
|
436
|
+
VersionName: string;
|
|
437
|
+
/** 可选渠道 */
|
|
438
|
+
Channel?: string;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* BuildPacksInfo(CreateCloudRunServer / DescribeVersionDetail / UpdateCloudRunServer)
|
|
442
|
+
*/
|
|
443
|
+
export interface IBuildPacksInfo {
|
|
444
|
+
/** 基础镜像 */
|
|
445
|
+
BaseImage: string;
|
|
446
|
+
/** 启动命令 */
|
|
447
|
+
EntryPoint: string;
|
|
448
|
+
/** 语言 */
|
|
449
|
+
RepoLanguage: string;
|
|
450
|
+
/** 上传文件名 */
|
|
451
|
+
UploadFilename: string;
|
|
452
|
+
/** 语言版本 */
|
|
453
|
+
LanguageVersion?: string;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* DescribeVersionDetail 响应
|
|
457
|
+
*/
|
|
458
|
+
export interface IDescribeVersionDetailResponse {
|
|
459
|
+
Name: string;
|
|
460
|
+
Port: number;
|
|
461
|
+
Cpu: number;
|
|
462
|
+
Mem: number;
|
|
463
|
+
MinNum: number;
|
|
464
|
+
MaxNum: number;
|
|
465
|
+
PolicyDetails: ICloudrunHpaPolicy[];
|
|
466
|
+
Dockerfile: string;
|
|
467
|
+
BuildDir: string;
|
|
468
|
+
EnvParams: string;
|
|
469
|
+
Status: string;
|
|
470
|
+
CreatedTime: string;
|
|
471
|
+
UpdatedTime: string;
|
|
472
|
+
LogPath: string;
|
|
473
|
+
EntryPoint: string | null;
|
|
474
|
+
Cmd: string | null;
|
|
475
|
+
VpcConf: IVpcConf | null;
|
|
476
|
+
VolumesConf: IVolumeConf[] | null;
|
|
477
|
+
BuildPacks: IBuildPacksInfo | null;
|
|
478
|
+
RequestId: string;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* SubmitServerRollback 请求参数
|
|
482
|
+
*/
|
|
483
|
+
export interface ISubmitServerRollbackParams {
|
|
484
|
+
/** 服务名 */
|
|
485
|
+
ServerName: string;
|
|
486
|
+
/** 当前版本名 */
|
|
487
|
+
CurrentVersionName: string;
|
|
488
|
+
/** 目标回滚版本名 */
|
|
489
|
+
RollbackVersionName: string;
|
|
490
|
+
/** 操作标识 */
|
|
491
|
+
OperatorRemark?: string;
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* SubmitServerRollback 响应
|
|
495
|
+
*/
|
|
496
|
+
export interface ISubmitServerRollbackResponse {
|
|
497
|
+
/** 任务 ID */
|
|
498
|
+
TaskId: number;
|
|
499
|
+
/** 请求 ID */
|
|
500
|
+
RequestId: string;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* DeleteCloudRunVersions 版本信息
|
|
504
|
+
*/
|
|
505
|
+
export interface ISimpleVersion {
|
|
506
|
+
/** 环境 ID(可选,不传时由 SDK 自动注入当前环境) */
|
|
507
|
+
EnvId?: string;
|
|
508
|
+
/** 服务名 */
|
|
509
|
+
ServerName: string;
|
|
510
|
+
/** 版本名 */
|
|
511
|
+
VersionName: string;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* DeleteCloudRunVersions 请求参数
|
|
515
|
+
*/
|
|
516
|
+
export interface IDeleteCloudRunVersionsParams {
|
|
517
|
+
/** 是否删除服务(仅最后一个版本时生效) */
|
|
518
|
+
IsDeleteServer: boolean;
|
|
519
|
+
/** 是否删除镜像(仅删除服务时生效) */
|
|
520
|
+
IsDeleteImage: boolean;
|
|
521
|
+
/** 待删除版本列表 */
|
|
522
|
+
SimpleVersions: ISimpleVersion[];
|
|
523
|
+
/** 操作标识 */
|
|
524
|
+
OperatorRemark?: string;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* FailDeleteVersions(删除失败版本信息)
|
|
528
|
+
*/
|
|
529
|
+
export interface IFailDeleteVersions {
|
|
530
|
+
/** 删除失败版本信息 */
|
|
531
|
+
Version: ISimpleVersion;
|
|
532
|
+
/** 删除失败错误码 */
|
|
533
|
+
ErrorCode: number;
|
|
534
|
+
/** 删除失败错误信息 */
|
|
535
|
+
ErrorMsg: string;
|
|
536
|
+
/** 删除操作 RequestId */
|
|
537
|
+
RequestId: string;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* SuccessDeleteVersions(删除成功的版本信息)
|
|
541
|
+
*/
|
|
542
|
+
export interface ISuccessDeleteVersions {
|
|
543
|
+
/** 版本简化信息 */
|
|
544
|
+
Version: ISimpleVersion;
|
|
545
|
+
/** 删除版本的 RequestId */
|
|
546
|
+
RequestId: string;
|
|
547
|
+
/** 删除版本结果 */
|
|
548
|
+
Result: string;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* DeleteCloudRunVersions 响应
|
|
552
|
+
*/
|
|
553
|
+
export interface IDeleteCloudRunVersionsResponse {
|
|
554
|
+
Result: 'succ' | 'fail' | 'partial' | string;
|
|
555
|
+
FailVersions: IFailDeleteVersions[];
|
|
556
|
+
SuccessVersions: ISuccessDeleteVersions[];
|
|
557
|
+
RequestId: string;
|
|
558
|
+
}
|
|
429
559
|
/**
|
|
430
560
|
* DescribeCloudRunDeployRecord 单条部署记录
|
|
431
561
|
*/
|
package/types/index.d.ts
CHANGED
|
@@ -56,6 +56,10 @@ declare class CloudBase {
|
|
|
56
56
|
get storage(): StorageService;
|
|
57
57
|
get database(): DatabaseService;
|
|
58
58
|
get hosting(): HostingService;
|
|
59
|
+
/**
|
|
60
|
+
* HTTP Service(CloudBaseGW)访问服务
|
|
61
|
+
* @deprecated 自 v5.0.0 起 HTTP Service 模块已废弃,请改用 env 下的域名与路由相关 API。
|
|
62
|
+
*/
|
|
59
63
|
get access(): AccessService;
|
|
60
64
|
get mysql(): MysqlService;
|
|
61
65
|
/**
|