@cloudbase/manager-node 5.7.0-beta.3 → 5.7.1-beta.1

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.
Files changed (64) hide show
  1. package/jest.config.unit.js +14 -0
  2. package/lib/cloudApp/index.js +3 -12
  3. package/lib/env/index.js +27 -0
  4. package/lib/environment.js +0 -11
  5. package/lib/function/index.js +67 -26
  6. package/lib/hosting/index.js +1 -4
  7. package/lib/index.js +0 -31
  8. package/lib/storage/index.js +7 -6
  9. package/lib/utils/index.js +5 -62
  10. package/package.json +1 -2
  11. package/types/cloudApp/index.d.ts +0 -4
  12. package/types/cloudApp/types.d.ts +6 -87
  13. package/types/env/index.d.ts +17 -1
  14. package/types/env/type.d.ts +260 -6
  15. package/types/environment.d.ts +0 -7
  16. package/types/function/index.d.ts +3 -0
  17. package/types/function/types.d.ts +0 -15
  18. package/types/hosting/index.d.ts +0 -6
  19. package/types/index.d.ts +0 -18
  20. package/types/interfaces/function.interface.d.ts +1 -1
  21. package/types/storage/index.d.ts +0 -6
  22. package/types/utils/index.d.ts +0 -13
  23. package/lib/deploy/DatabaseDeployer.js +0 -238
  24. package/lib/deploy/DeployOrchestrator.js +0 -632
  25. package/lib/deploy/FunctionDeployer.js +0 -611
  26. package/lib/deploy/GatewayDeployer.js +0 -612
  27. package/lib/deploy/StateStore.js +0 -327
  28. package/lib/deploy/StaticDeployer.js +0 -239
  29. package/lib/deploy/domain.js +0 -41
  30. package/lib/deploy/framework.js +0 -105
  31. package/lib/deploy/function/artifact.js +0 -207
  32. package/lib/deploy/function/builders/cloud.js +0 -536
  33. package/lib/deploy/function/cam-preflight.js +0 -157
  34. package/lib/deploy/function/cloud-build-service.js +0 -170
  35. package/lib/deploy/function/config-guard.js +0 -592
  36. package/lib/deploy/function/docker-preflight.js +0 -87
  37. package/lib/deploy/function/image-preflight.js +0 -164
  38. package/lib/deploy/function/local-builder.js +0 -129
  39. package/lib/deploy/function/planner.js +0 -282
  40. package/lib/deploy/function/preflight.js +0 -264
  41. package/lib/deploy/types.js +0 -99
  42. package/lib/projectValidator/index.js +0 -440
  43. package/lib/projectValidator/types.js +0 -2
  44. package/types/deploy/DatabaseDeployer.d.ts +0 -70
  45. package/types/deploy/DeployOrchestrator.d.ts +0 -168
  46. package/types/deploy/FunctionDeployer.d.ts +0 -158
  47. package/types/deploy/GatewayDeployer.d.ts +0 -194
  48. package/types/deploy/StateStore.d.ts +0 -170
  49. package/types/deploy/StaticDeployer.d.ts +0 -97
  50. package/types/deploy/domain.d.ts +0 -17
  51. package/types/deploy/framework.d.ts +0 -23
  52. package/types/deploy/function/artifact.d.ts +0 -40
  53. package/types/deploy/function/builders/cloud.d.ts +0 -110
  54. package/types/deploy/function/cam-preflight.d.ts +0 -51
  55. package/types/deploy/function/cloud-build-service.d.ts +0 -10
  56. package/types/deploy/function/config-guard.d.ts +0 -41
  57. package/types/deploy/function/docker-preflight.d.ts +0 -17
  58. package/types/deploy/function/image-preflight.d.ts +0 -21
  59. package/types/deploy/function/local-builder.d.ts +0 -26
  60. package/types/deploy/function/planner.d.ts +0 -15
  61. package/types/deploy/function/preflight.d.ts +0 -9
  62. package/types/deploy/types.d.ts +0 -429
  63. package/types/projectValidator/index.d.ts +0 -38
  64. package/types/projectValidator/types.d.ts +0 -26
@@ -10,80 +10,19 @@
10
10
  * 部署类型
11
11
  * - static-hosting: 静态托管部署
12
12
  * - http-function: HTTP 云函数部署(预留)
13
- * - custom: 自定义构建(CloudApp custom:源码 ZIP → 容器内执行 CustomSteps → docker build/push TCR),
14
- * 用于 HTTP 函数镜像的云端构建(buildStrategy: cloud)
15
13
  */
16
- export type DeployType = 'static-hosting' | 'http-function' | 'custom';
14
+ export type DeployType = 'static-hosting' | 'http-function';
17
15
  /**
18
16
  * 构建类型
19
17
  * - GIT: 从 Git 仓库构建
20
18
  * - ZIP: 从 ZIP 包构建
21
19
  * - TEMPLATE: 从模板构建
22
- * - zip: custom 构建的源码 ZIP(与 API 文档 BuildType 大小写保持一致)
23
20
  */
24
- export type BuildType = 'GIT' | 'ZIP' | 'TEMPLATE' | 'zip' | 'git';
25
- /**
26
- * custom 构建源码来源
27
- *对应 API 的 Source 字段,zip 模式回填 DescribeCloudAppCosInfo 返回的时间戳
28
- */
29
- export interface ICustomBuildSource {
30
- /** 源码类型,当前实现为 zip */
31
- type: 'zip' | 'git';
32
- /** COS 时间戳,原样使用 DescribeCloudAppCosInfo 返回的 UnixTimestamp */
33
- cosTimestamp?: string;
34
- /** COS 文件后缀,默认 .zip */
35
- cosSuffix?: string;
36
- }
37
- /** custom 构建环境变量项(明文,禁止写入敏感值) */
38
- export interface ICustomBuildEnv {
39
- key: string;
40
- value: string;
41
- }
42
- /**
43
- * custom 构建密钥项
44
- * CloudApp 在构建容器中按 $SECRET_{NAME} 注入,Value 不应进入日志或普通环境变量。
45
- */
46
- export interface ICustomBuildSecret {
47
- name: string;
48
- value: string;
49
- }
50
- /**
51
- * custom 构建自定义步骤
52
- * SDK 固定生成模板,用户不可控字段绝不作为任意 shell 片段拼接
53
- */
54
- export interface ICustomBuildStep {
55
- name: string;
56
- command: string;
57
- }
58
- /**
59
- * custom 构建单步状态(API 响应,字段大小写与响应一致)
60
- * 注意:Duration 为字符串、Status 为小写
61
- */
62
- export interface CloudAppBuildStep {
63
- Name: string;
64
- Status: string;
65
- Duration?: string;
66
- /** 失败时的退出码,用于定位 */
67
- ExitCode?: number;
68
- }
69
- /**
70
- * custom 构建产物(API 响应)
71
- * 镜像构建成功后Type 通常为 image
72
- */
73
- export interface CloudAppArtifact {
74
- Type: string;
75
- Name: string;
76
- Status?: string;
77
- /** 部分场景直接回传完整镜像地址 */
78
- ImageUri?: string;
79
- /** 部分场景回传 digest */
80
- Digest?: string;
81
- }
21
+ export type BuildType = 'GIT' | 'ZIP' | 'TEMPLATE';
82
22
  /**
83
23
  * 构建状态
84
- * custom 构建终态为 SUCCESS / FAILED / CANCELED
85
24
  */
86
- export type BuildStatus = 'BUILDING' | 'SUCCESS' | 'FAILED' | 'CANCELED';
25
+ export type BuildStatus = 'BUILDING' | 'SUCCESS' | 'FAILED';
87
26
  /**
88
27
  * 构建命令配置(入参)
89
28
  */
@@ -210,24 +149,14 @@ export interface CloudAppVersion {
210
149
  export interface ICreateCloudAppParams {
211
150
  /** 环境 ID(可选,默认从 Environment 获取) */
212
151
  envId?: string;
213
- /** 部署类型:static-hosting / http-function / custom */
152
+ /** 部署类型:static-hosting / http-function */
214
153
  deployType: DeployType;
215
154
  /** 服务名称 */
216
155
  serviceName: string;
217
- /** 构建类型:GIT / ZIP / TEMPLATE / zip / git */
156
+ /** 构建类型:GIT / ZIP / TEMPLATE */
218
157
  buildType?: BuildType;
219
158
  /** 静态托管配置(deployType 为 static-hosting 时使用) */
220
159
  staticConfig?: IStaticConfig;
221
- /** custom 构建源码来源(deployType 为 custom 时使用) */
222
- source?: ICustomBuildSource;
223
- /** custom 构建环境变量(deployType 为 custom 时使用,禁止敏感值) */
224
- env?: ICustomBuildEnv[];
225
- /** custom 构建密钥(deployType 为 custom 时使用) */
226
- secrets?: ICustomBuildSecret[];
227
- /** custom 构建自定义步骤(deployType 为 custom 时使用,SDK 固定模板) */
228
- customSteps?: ICustomBuildStep[];
229
- /** 跳过云端构建(纯静态直传场景:产物已直传,仅写部署记录,对应 API SkipBuild) */
230
- skipBuild?: boolean;
231
160
  }
232
161
  export interface ICreateCloudAppResult {
233
162
  ServiceName: string;
@@ -303,10 +232,6 @@ export interface IDescribeCloudAppVersionResult {
303
232
  Framework?: string;
304
233
  StaticConfig?: CloudAppStaticConfig;
305
234
  BuildTime?: string;
306
- /** custom 构建的分步状态(deployType 为 custom 时返回) */
307
- Steps?: CloudAppBuildStep[] | null;
308
- /** custom 构建产物(deployType 为 custom 时返回,镜像信息优先从此获取) */
309
- Artifacts?: CloudAppArtifact[] | null;
310
235
  RequestId: string;
311
236
  }
312
237
  export interface IDescribeCloudAppVersionListParams {
@@ -399,14 +324,8 @@ export interface IUploadCloudAppCodeParams {
399
324
  serviceName: string;
400
325
  /** 本地文件夹路径 */
401
326
  localPath: string;
402
- /** 忽略的文件/目录模式(追加到内置默认规则之后) */
327
+ /** 忽略的文件/目录模式 */
403
328
  ignore?: string[];
404
- /**
405
- * 是否排除 node_modules:
406
- * 默认 true(静态产物 / 版本快照场景,避免误传大目录);
407
- * 云端构建(需云端 install)场景设为 false,允许私有/离线依赖随源码包上传
408
- */
409
- excludeNodeModules?: boolean;
410
329
  /** 进度回调 */
411
330
  onProgress?: (progress: IProgressData) => void;
412
331
  /** 分步计时回调(各阶段完成时触发,用于 verbose 模式输出耗时) */
@@ -1,6 +1,6 @@
1
1
  import { Environment } from '../environment';
2
2
  import { IResponseInfo, AuthDomain, EnvInfo, LoginConfigItem, ICheckTcbServiceRes, ICreatePostpayRes, EnvBillingInfoItem, PriceResult } from '../interfaces';
3
- import { CalculatePackageCreatePriceParams, CalculatePackageRenewPriceParams, CalculatePackageModifyPriceParams, DescribeHttpServiceRouteParams, DescribeHttpServiceRouteRes, CreateHttpServiceRouteParams, CreateHttpServiceRouteRes, ModifyHttpServiceRouteParams, ModifyHttpServiceRouteRes, DeleteHttpServiceRouteParams, DeleteHttpServiceRouteRes, BindCustomDomainParams, BindCustomDomainRes, DeleteCustomDomainParams, DeleteCustomDomainRes } from './type';
3
+ import { CalculatePackageCreatePriceParams, CalculatePackageRenewPriceParams, CalculatePackageModifyPriceParams, DescribeHttpServiceRouteParams, DescribeHttpServiceRouteRes, VerifyHttpServiceRouteParams, VerifyHttpServiceRouteRes, CreateHttpServiceRouteParams, CreateHttpServiceRouteRes, ModifyHttpServiceRouteParams, ModifyHttpServiceRouteRes, DeleteHttpServiceRouteParams, DeleteHttpServiceRouteRes, BindCustomDomainParams, BindCustomDomainRes, DeleteCustomDomainParams, DeleteCustomDomainRes, DescribeCertificatesParams, DescribeCertificatesRes } from './type';
4
4
  import { CreateBillingDealParams, CreateEnvParams, BaasPackageInfo, DescribeBaasPackageListParams, ModifyEnvPlanParams, RenewEnvParams, DestroyEnvParams, DescribeEnvsParams, DescribeEnvInfoParams, DescribeEnvInfoResponse, DescribeEnvAccountCircleParams, DescribeEnvAccountCircleRes, DescribeCreditsUsageDetailParams, EnvPkgCreditsUsage } from '../interfaces/tcb.interface';
5
5
  type SOURCE = 'miniapp' | 'qcloud';
6
6
  interface IDeleteDomainRes {
@@ -559,6 +559,7 @@ export declare class EnvService {
559
559
  private envType?;
560
560
  private commonService;
561
561
  private billingService;
562
+ private certificateCloudService;
562
563
  private tokenCache;
563
564
  constructor(environment: Environment);
564
565
  /**
@@ -882,12 +883,27 @@ export declare class EnvService {
882
883
  Usages: EnvPkgCreditsUsage[];
883
884
  RequestId: string;
884
885
  }>;
886
+ /**
887
+ * 获取当前凭证有权限访问的 SSL 证书列表。
888
+ *
889
+ * 证书用于自定义域名 HTTPS 配置,本接口不依赖 CloudBase 环境信息。
890
+ * @param {DescribeCertificatesParams} params 查询参数
891
+ * @returns {Promise<DescribeCertificatesRes>}
892
+ */
893
+ describeCertificates(params?: DescribeCertificatesParams): Promise<DescribeCertificatesRes>;
885
894
  /**
886
895
  * 查询HTTP访问服务域名路由信息
887
896
  * @param {DescribeHttpServiceRouteParams} params 查询参数
888
897
  * @returns {Promise<DescribeHttpServiceRouteRes>}
889
898
  */
890
899
  describeHttpServiceRoute(params: DescribeHttpServiceRouteParams): Promise<DescribeHttpServiceRouteRes>;
900
+ /**
901
+ * 校验HTTP访问服务域名路由
902
+ * 此操作为只读预检,不会创建任何资源。
903
+ * @param {VerifyHttpServiceRouteParams} params 校验参数
904
+ * @returns {Promise<VerifyHttpServiceRouteRes>}
905
+ */
906
+ verifyHttpServiceRoute(params: VerifyHttpServiceRouteParams): Promise<VerifyHttpServiceRouteRes>;
891
907
  /**
892
908
  * 创建HTTP访问服务域名路由
893
909
  * @param {CreateHttpServiceRouteParams} params 创建参数
@@ -14,6 +14,169 @@ export interface CalculatePackageModifyPriceParams {
14
14
  envId: string;
15
15
  currency?: 'CNY' | 'USD';
16
16
  }
17
+ /** 获取 SSL 证书列表请求参数。 */
18
+ export interface DescribeCertificatesParams {
19
+ /** 分页偏移量,从 0 开始。 */
20
+ Offset?: number;
21
+ /** 每页数量,范围为 1 至 1000。 */
22
+ Limit?: number;
23
+ /** 模糊匹配证书 ID、备注名称或证书域名。 */
24
+ SearchKey?: string;
25
+ /** 证书类型:CA 为客户端证书,SVR 为服务器证书。 */
26
+ CertificateType?: 'CA' | 'SVR';
27
+ /** 项目 ID。 */
28
+ ProjectId?: number;
29
+ /** 按证书到期时间排序。 */
30
+ ExpirationSort?: 'ASC' | 'DESC';
31
+ /** 证书状态筛选。 */
32
+ CertificateStatus?: number[];
33
+ /** 是否仅返回可部署证书:1 是,0 否。 */
34
+ Deployable?: 0 | 1;
35
+ /** 是否仅返回上传托管证书:1 是,0 否。 */
36
+ Upload?: 0 | 1;
37
+ /** 是否仅返回可续期证书:1 是,0 否。 */
38
+ Renew?: 0 | 1;
39
+ /** 来源筛选。 */
40
+ FilterSource?: 'upload' | 'buy';
41
+ /** 是否仅返回国密证书:1 是,0 否。 */
42
+ IsSM?: 0 | 1;
43
+ /** 是否仅返回即将过期证书:1 是,0 否。 */
44
+ FilterExpiring?: 0 | 1;
45
+ /** 是否仅返回可托管证书:1 是,0 否。 */
46
+ Hostable?: 0 | 1;
47
+ /** 标签筛选条件。 */
48
+ Tags?: Array<{
49
+ TagKey: string;
50
+ TagValue?: string;
51
+ }>;
52
+ /** 是否仅返回等待签发证书:1 是,0 否。 */
53
+ IsPendingIssue?: 0 | 1;
54
+ /** 指定证书 ID 列表。 */
55
+ CertIds?: string[];
56
+ /** 订阅服务 ID。 */
57
+ ServiceId?: string;
58
+ }
59
+ /** Certificates.CertificateExtra:证书扩展信息。 */
60
+ export interface CertificateExtra {
61
+ DomainNumber: string;
62
+ OriginCertificateId: string | null;
63
+ ReplacedBy: string | null;
64
+ ReplacedFor: string | null;
65
+ RenewOrder: string | null;
66
+ SMCert: number;
67
+ CompanyType: number;
68
+ ServiceRenewCertificateId: string;
69
+ ServiceOriginCertificateId: string;
70
+ }
71
+ /** Certificates.ProjectInfo:项目信息。 */
72
+ export interface ProjectInfo {
73
+ ProjectName: string;
74
+ ProjectCreatorUin: number;
75
+ ProjectCreateTime: string;
76
+ ProjectResume: string;
77
+ OwnerUin: number;
78
+ ProjectId: string;
79
+ }
80
+ /** Certificates.PreAuditInfo:证书预审核信息。 */
81
+ export interface PreAuditInfo {
82
+ TotalPeriod: number;
83
+ NowPeriod: number;
84
+ ManagerId: string;
85
+ }
86
+ /** Certificates.HostingConfig:托管配置。 */
87
+ export interface HostingConfig {
88
+ ReplaceTime?: number;
89
+ MessageTypes?: number[];
90
+ ReplaceStartTime?: string;
91
+ ReplaceEndTime?: string;
92
+ }
93
+ /** Certificates.SupportDownloadType:支持下载的服务器格式。 */
94
+ export interface SupportDownloadType {
95
+ NGINX: boolean;
96
+ APACHE: boolean;
97
+ TOMCAT: boolean;
98
+ IIS: boolean;
99
+ JKS: boolean;
100
+ OTHER: boolean;
101
+ ROOT: boolean;
102
+ }
103
+ /** Certificates.Tags:标签信息。 */
104
+ export interface CertificateTag {
105
+ TagKey: string;
106
+ TagValue: string;
107
+ }
108
+ /** SSL 证书列表项,对应 DescribeCertificates 响应中的 Certificates 元素。 */
109
+ export interface Certificates {
110
+ OwnerUin: string;
111
+ ProjectId: string;
112
+ From: string;
113
+ PackageType: string;
114
+ CertificateType: 'CA' | 'SVR';
115
+ ProductZhName: string;
116
+ Domain: string;
117
+ Alias: string;
118
+ Status: number;
119
+ CertificateExtra: CertificateExtra;
120
+ VulnerabilityStatus: 'INACTIVE' | 'ACTIVE';
121
+ StatusMsg: string;
122
+ VerifyType: 'DNS_AUTO' | 'DNS' | 'FILE' | 'DNS_PROXY' | 'FILE_PROXY';
123
+ CertBeginTime: string;
124
+ CertEndTime: string;
125
+ ValidityPeriod: string;
126
+ InsertTime: string;
127
+ CertificateId: string;
128
+ SubjectAltName: string[];
129
+ PackageTypeName: string;
130
+ StatusName: string;
131
+ IsVip: boolean;
132
+ IsDv: boolean;
133
+ IsWildcard: boolean;
134
+ IsVulnerability: boolean;
135
+ RenewAble: boolean;
136
+ ProjectInfo: ProjectInfo;
137
+ BoundResource: string[];
138
+ Deployable: boolean;
139
+ Tags: CertificateTag[];
140
+ IsIgnore: boolean;
141
+ IsSM: boolean;
142
+ EncryptAlgorithm: string;
143
+ CAEncryptAlgorithms: string[];
144
+ CAEndTimes: string[];
145
+ CACommonNames: string[];
146
+ PreAuditInfo: PreAuditInfo;
147
+ AutoRenewFlag: number;
148
+ HostingStatus: number;
149
+ HostingCompleteTime: string;
150
+ HostingRenewCertId: string;
151
+ HasRenewOrder: string;
152
+ ReplaceOriCertIsDelete: boolean;
153
+ IsExpiring: boolean;
154
+ DVAuthDeadline: string;
155
+ ValidationPassedTime: string;
156
+ CertSANs: string[];
157
+ AwaitingValidationMsg: string;
158
+ AllowDownload: boolean;
159
+ IsDNSPODResolve: boolean;
160
+ IsPackage: boolean;
161
+ KeyPasswordCustomFlag: boolean;
162
+ SupportDownloadType: SupportDownloadType;
163
+ CertRevokedTime: string;
164
+ HostingResourceTypes: string[];
165
+ HostingConfig: HostingConfig | null;
166
+ IsHostingUploadRenewCert: boolean;
167
+ ServiceId: string;
168
+ ServiceStatus: 'initing' | 'running' | 'expired' | 'refunded' | 'nearExpire';
169
+ CertServiceBeginTime: string;
170
+ CertServiceEndTime: string;
171
+ CertServiceShareEnabled: boolean;
172
+ CertServiceValidCertificateCount: number;
173
+ }
174
+ /** 获取 SSL 证书列表响应。 */
175
+ export interface DescribeCertificatesRes {
176
+ TotalCount: number;
177
+ Certificates: Certificates[];
178
+ RequestId: string;
179
+ }
17
180
  /**
18
181
  * 客户端限频配置
19
182
  */
@@ -35,18 +198,43 @@ export interface HTTPServicePathRewrite {
35
198
  StaticStorePrefix?: string;
36
199
  Prefix?: string;
37
200
  }
201
+ /**
202
+ * HTTP 访问服务路由添加 header 配置
203
+ */
204
+ export interface HTTPServiceHeaderToAdd {
205
+ Key?: string;
206
+ Value?: string;
207
+ Action?: 'APPEND_IF_EXISTS_OR_ADD' | 'ADD_IF_ABSENT' | 'OVERWRITE_IF_EXISTS_OR_ADD' | 'OVERWRITE_IF_EXISTS';
208
+ }
209
+ /**
210
+ * HTTP 访问服务路由 headers 处理配置
211
+ */
212
+ export interface HTTPServiceHeadersHandler {
213
+ RequestHeadersToAdd?: HTTPServiceHeaderToAdd[];
214
+ RequestHeadersToRemove?: string[];
215
+ ResponseHeadersToAdd?: HTTPServiceHeaderToAdd[];
216
+ ResponseHeadersToRemove?: string[];
217
+ }
218
+ /**
219
+ * HTTP访问服务路由扩展字段
220
+ */
221
+ export interface HTTPServiceExtension {
222
+ HeadersHandler?: HTTPServiceHeadersHandler;
223
+ [key: string]: unknown;
224
+ }
38
225
  /**
39
226
  * HTTP访问服务路由信息
40
227
  */
41
228
  export interface HTTPServiceRoute {
42
229
  Path: string;
43
230
  PathRewrite?: HTTPServicePathRewrite;
44
- UpstreamResourceType: 'SCF' | 'CBR' | 'STATIC_STORE' | 'WEB_SCF' | 'LH';
231
+ UpstreamResourceType: 'SCF' | 'CBR' | 'STATIC_STORE' | 'WEB_SCF' | 'LH' | 'STORAGE';
45
232
  UpstreamResourceName: string;
46
233
  EnableSafeDomain: boolean;
47
234
  EnableAuth: boolean;
48
235
  EnablePathTransmission: boolean;
49
236
  QPSPolicy?: HTTPServiceRouteQPSPolicy;
237
+ Extension?: HTTPServiceExtension;
50
238
  Enable: boolean;
51
239
  CreateTime: string;
52
240
  UpdateTime: string;
@@ -57,7 +245,7 @@ export interface HTTPServiceRoute {
57
245
  export interface HTTPServiceDomain {
58
246
  Domain: string;
59
247
  DomainType: 'HTTPSERVICE' | 'CBR' | 'ANYSERVICE' | 'AI_AGENT' | 'VM' | 'INTEGRATION_CALLBACK';
60
- AccessType: 'DIRECT' | 'CDN' | 'CUSTOM';
248
+ AccessType: 'DIRECT' | 'CDN' | 'CUSTOM' | 'EO';
61
249
  CertId: string;
62
250
  Protocol: 'HTTP_AND_HTTPS' | 'HTTP_TO_HTTPS' | 'HTTPS_TO_HTTP';
63
251
  Cname: string;
@@ -66,6 +254,7 @@ export interface HTTPServiceDomain {
66
254
  Status: 'PROCESSING' | 'FAIL' | 'SUCCESS';
67
255
  DNSStatus: 'OK' | 'INVALID';
68
256
  Routes?: HTTPServiceRoute[];
257
+ Extension?: HTTPServiceExtension;
69
258
  CreateTime: string;
70
259
  UpdateTime: string;
71
260
  }
@@ -99,13 +288,14 @@ export interface DescribeHttpServiceRouteRes {
99
288
  */
100
289
  export interface HTTPServiceRouteParam {
101
290
  Path: string;
102
- UpstreamResourceType?: 'SCF' | 'CBR' | 'STATIC_STORE' | 'WEB_SCF' | 'LH';
291
+ UpstreamResourceType?: 'SCF' | 'CBR' | 'STATIC_STORE' | 'WEB_SCF' | 'LH' | 'STORAGE';
103
292
  UpstreamResourceName?: string;
104
293
  PathRewrite?: HTTPServicePathRewrite;
105
294
  EnableSafeDomain?: boolean;
106
295
  EnableAuth?: boolean;
107
296
  EnablePathTransmission?: boolean;
108
297
  QPSPolicy?: HTTPServiceRouteQPSPolicy;
298
+ Extension?: HTTPServiceExtension;
109
299
  Enable?: boolean;
110
300
  }
111
301
  /**
@@ -115,10 +305,74 @@ export interface HTTPServiceDomainParam {
115
305
  Domain: string;
116
306
  AccessType?: 'DIRECT' | 'CDN' | 'CUSTOM' | 'EO';
117
307
  CertId?: string;
118
- Protocol?: 'HTTP' | 'HTTPS' | 'HTTP_AND_HTTPS' | 'HTTP_TO_HTTPS' | 'HTTPS_TO_HTTP';
308
+ Protocol?: 'HTTP_AND_HTTPS' | 'HTTP_TO_HTTPS' | 'HTTPS_TO_HTTP';
119
309
  CustomCname?: string;
120
310
  Enable?: boolean;
121
311
  Routes?: HTTPServiceRouteParam[];
312
+ Extension?: HTTPServiceExtension;
313
+ }
314
+ /**
315
+ * 前置校验检查状态
316
+ */
317
+ export type VerifyHttpServiceRouteCheckStatus = 'PASS' | 'SKIPPED' | 'FAIL';
318
+ /**
319
+ * 前置校验失败原因
320
+ */
321
+ export type VerifyHttpServiceRouteCheckCode = 'INTERNAL_CHECK_ERROR' | 'OWNERSHIP_DNS_LOOKUP_FAILED' | 'OWNERSHIP_VERIFY_FAILED' | 'CERT_VERIFY_FAILED' | 'QUOTA_EXCEEDED' | 'ROUTE_CONFLICT' | 'DOMAIN_IN_USE' | 'NON_INTERNAL_ACCOUNT' | 'DOMAIN_IN_BLACKLIST' | 'CDN_RESOURCE_PROCESSING' | 'CDN_RESOURCE_OFFLINE' | 'EO_OWNERSHIP_VERIFY_FAILED' | 'EO_DOMAIN_NOT_ICP' | 'EO_DOMAIN_IN_USE';
322
+ /**
323
+ * 域名归属权 DNS 验证指引
324
+ */
325
+ export interface OwnershipVerificationDnsInfo {
326
+ Subdomain?: string;
327
+ RecordType?: string;
328
+ RecordValue?: string;
329
+ }
330
+ /**
331
+ * 域名归属权文件验证指引
332
+ */
333
+ export interface OwnershipVerificationFileInfo {
334
+ Path?: string;
335
+ Content?: string;
336
+ }
337
+ /**
338
+ * 域名归属权验证指引
339
+ */
340
+ export interface OwnershipVerificationInfo {
341
+ Domain?: string;
342
+ DnsVerification?: OwnershipVerificationDnsInfo[];
343
+ FileVerification?: OwnershipVerificationFileInfo[];
344
+ }
345
+ /**
346
+ * VerifyHTTPServiceRoute 单项前置校验结果
347
+ */
348
+ export interface VerifyHttpServiceRouteCheckItem {
349
+ Status: VerifyHttpServiceRouteCheckStatus;
350
+ Code?: VerifyHttpServiceRouteCheckCode;
351
+ Message?: string;
352
+ OwnershipVerification?: OwnershipVerificationInfo;
353
+ }
354
+ /**
355
+ * VerifyHTTPServiceRoute 请求参数
356
+ */
357
+ export interface VerifyHttpServiceRouteParams {
358
+ EnvId: string;
359
+ Domain: HTTPServiceDomainParam;
360
+ }
361
+ /**
362
+ * VerifyHTTPServiceRoute 返回结果
363
+ */
364
+ export interface VerifyHttpServiceRouteRes {
365
+ Passed: boolean;
366
+ Ownership: VerifyHttpServiceRouteCheckItem;
367
+ Cert: VerifyHttpServiceRouteCheckItem;
368
+ Quota: VerifyHttpServiceRouteCheckItem;
369
+ RouteConflict: VerifyHttpServiceRouteCheckItem;
370
+ DomainConflict: VerifyHttpServiceRouteCheckItem;
371
+ InternalAccount: VerifyHttpServiceRouteCheckItem;
372
+ Blacklist: VerifyHttpServiceRouteCheckItem;
373
+ CDNResource: VerifyHttpServiceRouteCheckItem;
374
+ EO: VerifyHttpServiceRouteCheckItem;
375
+ RequestId: string;
122
376
  }
123
377
  /**
124
378
  * CreateHTTPServiceRoute 请求参数
@@ -167,8 +421,8 @@ export interface DeleteHttpServiceRouteRes {
167
421
  export interface BindCustomDomainDomainParam {
168
422
  Domain: string;
169
423
  CertId: string;
170
- AccessType?: 'DIRECT' | 'CDN' | 'CUSTOM' | 'EO';
171
- Protocol?: 'HTTP' | 'HTTPS' | 'HTTP_AND_HTTPS' | 'HTTP_TO_HTTPS' | 'HTTPS_TO_HTTP';
424
+ AccessType?: 'DIRECT' | 'CDN' | 'CUSTOM';
425
+ Protocol?: 'HTTP_AND_HTTPS' | 'HTTP_TO_HTTPS' | 'HTTPS_TO_HTTP';
172
426
  Enable?: boolean;
173
427
  CustomCname?: string;
174
428
  }
@@ -1,6 +1,5 @@
1
1
  import { DatabaseService } from './database';
2
2
  import { FunctionService } from './function';
3
- import { FunctionDeployer } from './deploy/FunctionDeployer';
4
3
  import { CloudRunService } from './cloudrun';
5
4
  import { AgentService } from './agent';
6
5
  import { StorageService } from './storage';
@@ -28,7 +27,6 @@ export declare class Environment {
28
27
  private envId;
29
28
  private envType?;
30
29
  private functionService;
31
- private functionDeployer;
32
30
  private cloudRunService;
33
31
  private agentService;
34
32
  private databaseService;
@@ -54,11 +52,6 @@ export declare class Environment {
54
52
  getStorageService(): StorageService;
55
53
  getDatabaseService(): DatabaseService;
56
54
  getFunctionService(): FunctionService;
57
- /**
58
- * 获取函数部署编排器
59
- * 采用懒初始化,避免模块循环引用导致的初始化顺序问题
60
- */
61
- getFunctionDeployer(): FunctionDeployer;
62
55
  getCloudRunService(): CloudRunService;
63
56
  getAgentService(): AgentService;
64
57
  getEnvService(): EnvService;
@@ -232,6 +232,9 @@ export declare class FunctionService {
232
232
  private tcbService;
233
233
  private userService;
234
234
  constructor(environment: Environment);
235
+ private get useTcbFunctionApi();
236
+ private get functionCloudService();
237
+ private get namespaceParamKey();
235
238
  /**
236
239
  * 增量更新函数代码
237
240
  * @param {IUpdateFunctionIncrementalCodeParam} funcParam
@@ -105,21 +105,6 @@ export interface IFunctionInfo {
105
105
  Variables: IEnvVariable[];
106
106
  };
107
107
  Type: string;
108
- /** HTTP 函数协议类型;SCF 缺省时表示普通 HTTP */
109
- ProtocolType?: string;
110
- /** 自定义镜像函数配置 */
111
- ImageConfig?: {
112
- ImageType?: string;
113
- ImageUri?: string;
114
- RegistryId?: string;
115
- EntryPoint?: string;
116
- Command?: string;
117
- Args?: string;
118
- ContainerImageAccelerate?: boolean;
119
- ImagePort?: number;
120
- CommandList?: string[];
121
- ArgsList?: string[];
122
- };
123
108
  EipConfig: {
124
109
  EipFixed: 'FALSE' | 'TRUE';
125
110
  Eips: string[];
@@ -122,12 +122,6 @@ export interface IRoutingRules {
122
122
  export interface IBucketWebsiteOptiosn {
123
123
  indexDocument: string;
124
124
  errorDocument?: string;
125
- /** 错误文档是否保留原始 HTTP 状态码:Enabled / Disabled(SPA 回退需 Disabled) */
126
- originalHttpStatus?: string;
127
- /** 404 是否展示腾讯云公益页面:Enabled / Disabled(SPA 回退需 Disabled) */
128
- charity404?: string;
129
- /** 忽略 HTML 扩展名:Enabled / Disabled */
130
- autoAddressing?: string;
131
125
  routingRules?: Array<IRoutingRules>;
132
126
  }
133
127
  export interface IFindOptions {
package/types/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { EnvService } from './env';
2
2
  import { FunctionService } from './function';
3
- import { FunctionDeployer } from './deploy/FunctionDeployer';
4
3
  import { CloudRunService } from './cloudrun';
5
4
  import { AgentService } from './agent';
6
5
  import { StorageService } from './storage';
@@ -22,8 +21,6 @@ import { CloudAppService } from './cloudApp';
22
21
  import { AiModelService } from './aiModel';
23
22
  import { IntegrationService } from './integration';
24
23
  import { MonitorService } from './monitor';
25
- import { ProjectValidator } from './projectValidator';
26
- import { DeployOrchestrator } from './deploy/DeployOrchestrator';
27
24
  interface CloudBaseConfig {
28
25
  secretId?: string;
29
26
  secretKey?: string;
@@ -50,17 +47,10 @@ declare class CloudBase {
50
47
  private cloudBaseConfig;
51
48
  private environmentManager;
52
49
  private docsService;
53
- private projectValidatorService;
54
- private deployOrchestratorService;
55
50
  constructor(config?: CloudBaseConfig);
56
51
  addEnvironment(envId: string): void;
57
52
  currentEnvironment(): Environment;
58
53
  get functions(): FunctionService;
59
- /**
60
- * 函数部署编排器(FunctionDeployer)
61
- * 在现有 FunctionService 之上,按 buildStrategy 编排 Event/HTTP 函数的创建、更新与访问收敛
62
- */
63
- get functionDeployer(): FunctionDeployer;
64
54
  get cloudrun(): CloudRunService;
65
55
  get agent(): AgentService;
66
56
  get storage(): StorageService;
@@ -111,14 +101,6 @@ declare class CloudBase {
111
101
  */
112
102
  get monitor(): MonitorService;
113
103
  get docs(): DocsService;
114
- get projectValidator(): ProjectValidator;
115
- getProjectValidator(): ProjectValidator;
116
- /**
117
- * 声明式部署编排器
118
- * 顺序:database → functions → app → hosting → gateway;支持 dry-run / only / skip / 幂等重试
119
- */
120
- get deployOrchestrator(): DeployOrchestrator;
121
- getDeployOrchestrator(): DeployOrchestrator;
122
104
  getEnvironmentManager(): EnvironmentManager;
123
105
  getManagerConfig(): CloudBaseConfig;
124
106
  get isInternalEndpoint(): Boolean;
@@ -44,7 +44,7 @@ export interface ICloudFunction extends ICloudFunctionConfig {
44
44
  name: string;
45
45
  description?: string;
46
46
  type?: 'Event' | 'HTTP';
47
- protocolType?: 'HTTP' | 'WS';
47
+ protocolType?: 'WS';
48
48
  protocolParams?: {
49
49
  wsParams?: {
50
50
  idleTimeOut?: number;
@@ -49,12 +49,6 @@ export interface IRoutingRules {
49
49
  export interface IBucketWebsiteOptions {
50
50
  indexDocument: string;
51
51
  errorDocument?: string;
52
- /** 错误文档是否保留原始 HTTP 状态码:Enabled / Disabled(SPA 回退需 Disabled,否则 404 状态码使前端路由失效) */
53
- originalHttpStatus?: string;
54
- /** 404 是否展示腾讯云公益页面:Enabled / Disabled(SPA 回退需 Disabled,否则覆盖错误文档) */
55
- charity404?: string;
56
- /** 忽略 HTML 扩展名:Enabled / Disabled(未传则保持默认 Disabled) */
57
- autoAddressing?: string;
58
52
  routingRules?: Array<IRoutingRules>;
59
53
  region: string;
60
54
  bucket: string;
@@ -6,24 +6,11 @@ export * from './envLazy';
6
6
  export * from './fs';
7
7
  export * from './http-request';
8
8
  export { guid6 } from './uuid';
9
- interface IZipExtraEntry {
10
- /** zip 包内的相对路径 */
11
- zipPath: string;
12
- /** 文件文本内容 */
13
- content: string | Buffer;
14
- /** unix 权限位(八进制),如 0o755 */
15
- mode?: number;
16
- }
17
9
  interface IZipOption {
18
10
  dirPath: string;
19
11
  outputPath: string;
20
12
  ignore?: string | string[];
21
13
  pattern?: string;
22
- /**
23
- * 额外注入 zip 的文件条目(不来自 dirPath),用于把 SDK 生成的辅助文件
24
- * (如构建推送脚本)打进包内,而不污染用户源码目录。
25
- */
26
- extraEntries?: IZipExtraEntry[];
27
14
  }
28
15
  export declare function compressToZip(option: IZipOption): Promise<unknown>;
29
16
  /**