@cloudbase/manager-node 5.8.0-beta.0 → 5.8.0-beta.2
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/lib/deploy/DeployOrchestrator.js +8 -4
- package/lib/deploy/FunctionDeployer.js +16 -21
- package/lib/deploy/StateStore.js +1 -0
- package/lib/deploy/function/artifact.js +34 -9
- package/lib/deploy/function/builders/cloud.js +129 -4
- package/lib/deploy/function/cam-preflight.js +95 -79
- package/lib/deploy/function/config-guard.js +138 -70
- package/lib/deploy/function/local-builder.js +1 -1
- package/lib/deploy/types.js +5 -1
- package/lib/function/index.js +34 -4
- package/lib/projectValidator/index.js +5 -3
- package/package.json +2 -2
- package/types/deploy/FunctionDeployer.d.ts +2 -0
- package/types/deploy/StateStore.d.ts +4 -0
- package/types/deploy/function/builders/cloud.d.ts +1 -1
- package/types/deploy/function/cam-preflight.d.ts +19 -23
- package/types/deploy/types.d.ts +38 -5
- package/types/function/index.d.ts +3 -0
package/types/deploy/types.d.ts
CHANGED
|
@@ -130,6 +130,10 @@ export declare const FUNCTION_DEPLOY_ERROR: {
|
|
|
130
130
|
readonly PREFLIGHT_IMAGE_PULL_POLICY_MISSING: "PREFLIGHT_IMAGE_PULL_POLICY_MISSING";
|
|
131
131
|
readonly PREFLIGHT_IMAGE_PULL_AUTH_GRANTED: "PREFLIGHT_IMAGE_PULL_AUTH_GRANTED";
|
|
132
132
|
readonly PREFLIGHT_IMAGE_PULL_AUTH_UNVERIFIABLE: "PREFLIGHT_IMAGE_PULL_AUTH_UNVERIFIABLE";
|
|
133
|
+
readonly PREFLIGHT_TCR_PUSH_ROLE_MISSING: "PREFLIGHT_TCR_PUSH_ROLE_MISSING";
|
|
134
|
+
readonly PREFLIGHT_TCR_PUSH_POLICY_MISSING: "PREFLIGHT_TCR_PUSH_POLICY_MISSING";
|
|
135
|
+
readonly PREFLIGHT_TCR_PUSH_AUTH_GRANTED: "PREFLIGHT_TCR_PUSH_AUTH_GRANTED";
|
|
136
|
+
readonly PREFLIGHT_TCR_PUSH_AUTH_UNVERIFIABLE: "PREFLIGHT_TCR_PUSH_AUTH_UNVERIFIABLE";
|
|
133
137
|
readonly PREFLIGHT_CAM_PERMISSION_DENIED: "PREFLIGHT_CAM_PERMISSION_DENIED";
|
|
134
138
|
readonly FUNCTION_RECREATE_REQUIRED: "FUNCTION_RECREATE_REQUIRED";
|
|
135
139
|
readonly NOT_IMPLEMENTED: "NOT_IMPLEMENTED";
|
|
@@ -152,6 +156,35 @@ export interface IFunctionDeployCommon {
|
|
|
152
156
|
/** 声明式配置中的函数代码目录,由 DeployOrchestrator 解析为绝对 functionPath */
|
|
153
157
|
dir?: string;
|
|
154
158
|
l5?: boolean | 'TRUE' | 'FALSE';
|
|
159
|
+
/** 标签列表(透传为 SCF Tags) */
|
|
160
|
+
tags?: {
|
|
161
|
+
Key: string;
|
|
162
|
+
Value: string;
|
|
163
|
+
}[];
|
|
164
|
+
/** 日志投递 CLS 日志集 ID */
|
|
165
|
+
clsLogsetId?: string;
|
|
166
|
+
/** 日志投递 CLS 主题 ID */
|
|
167
|
+
clsTopicId?: string;
|
|
168
|
+
/** 死信队列配置(透传为 SCF DeadLetterConfig) */
|
|
169
|
+
deadLetterConfig?: Record<string, unknown>;
|
|
170
|
+
/** 公网访问配置(透传为 SCF PublicNetConfig) */
|
|
171
|
+
publicNetConfig?: Record<string, unknown>;
|
|
172
|
+
/** 文件系统 CFS 配置(透传为 SCF CfsConfig) */
|
|
173
|
+
cfsConfig?: Record<string, unknown>;
|
|
174
|
+
/** 内网固定 IP 配置(透传为 SCF IntranetConfig) */
|
|
175
|
+
intranetConfig?: Record<string, unknown>;
|
|
176
|
+
/** 初始化超时时间(秒),范围 1-60 */
|
|
177
|
+
initTimeout?: number;
|
|
178
|
+
/** 是否开启异步属性(仅 CreateFunction 支持) */
|
|
179
|
+
asyncRunEnable?: boolean | 'TRUE' | 'FALSE';
|
|
180
|
+
/** 是否开启事件追踪(仅 CreateFunction 支持) */
|
|
181
|
+
traceEnable?: boolean | 'TRUE' | 'FALSE';
|
|
182
|
+
/** 是否自动创建 CLS 索引(仅 CreateFunction 支持) */
|
|
183
|
+
autoDeployClsTopicIndex?: boolean | 'TRUE' | 'FALSE';
|
|
184
|
+
/** 是否自动创建 CLS 主题(仅 CreateFunction 支持) */
|
|
185
|
+
autoCreateClsTopic?: boolean | 'TRUE' | 'FALSE';
|
|
186
|
+
/** 是否开启 DNS 缓存(仅 Event 函数支持) */
|
|
187
|
+
dnsCache?: boolean | 'TRUE' | 'FALSE';
|
|
155
188
|
}
|
|
156
189
|
/** 本地代码来源,三者互斥 */
|
|
157
190
|
export interface ILocalCodeSource {
|
|
@@ -229,11 +262,11 @@ export interface IImageBuildTarget {
|
|
|
229
262
|
namespace?: string;
|
|
230
263
|
/**
|
|
231
264
|
* 目标镜像仓库路径。
|
|
232
|
-
* cloud
|
|
233
|
-
* registry/namespace/repository
|
|
265
|
+
* personal cloud 可省略并默认使用函数名;enterprise cloud 在自动实例发现完成前需提供完整地址;
|
|
266
|
+
* local 策略当前需提供可直接 push 的完整 registry/namespace/repository 地址。
|
|
234
267
|
*/
|
|
235
268
|
repository?: string;
|
|
236
|
-
/**
|
|
269
|
+
/** local 策略的目标镜像 tag;cloud 策略由平台生成,不接受自定义 tag */
|
|
237
270
|
tag?: string;
|
|
238
271
|
/** 目标平台,默认 linux/amd64 */
|
|
239
272
|
platform?: string;
|
|
@@ -249,9 +282,9 @@ export interface IHttpImageRuntimeCommon extends IHttpFunctionDeployCommon {
|
|
|
249
282
|
runtime?: typeof CUSTOM_IMAGE_RUNTIME;
|
|
250
283
|
/** 容器监听端口,仅允许 9000 */
|
|
251
284
|
imagePort?: number;
|
|
252
|
-
/**
|
|
285
|
+
/** 镜像类型;省略时有 registryId 推断为 enterprise,否则推断为 personal */
|
|
253
286
|
imageType?: 'enterprise' | 'personal';
|
|
254
|
-
/** 企业版 TCR 实例 ID
|
|
287
|
+
/** 企业版 TCR 实例 ID 的运行时规范位置;个人版镜像不传 */
|
|
255
288
|
registryId?: string;
|
|
256
289
|
entryPoint?: string;
|
|
257
290
|
command?: string;
|
|
@@ -202,6 +202,7 @@ export interface IFunctionCodeOptions {
|
|
|
202
202
|
destPath: string;
|
|
203
203
|
functionName: string;
|
|
204
204
|
codeSecret?: string;
|
|
205
|
+
qualifier?: string;
|
|
205
206
|
}
|
|
206
207
|
export interface ILayerDownloadOptions {
|
|
207
208
|
name: string;
|
|
@@ -225,6 +226,8 @@ export interface ILayer {
|
|
|
225
226
|
LayerName: string;
|
|
226
227
|
LayerVersion: number;
|
|
227
228
|
}
|
|
229
|
+
/** 企业版 TCR 镜像对 SCF 不可见时的排查指引 */
|
|
230
|
+
export declare const ENTERPRISE_IMAGE_REGION_GUIDANCE = "\u8BF7\u786E\u8BA4 TCR \u4F01\u4E1A\u7248\u5B9E\u4F8B\u5DF2\u5728\u5F53\u524D\u51FD\u6570\u5730\u57DF\u63D0\u4F9B\u53EF\u8BBF\u95EE\u7684\u5B9E\u4F8B\u6216\u590D\u5236\u5B9E\u4F8B\uFF0C\u5E76\u68C0\u67E5 RegistryId\u3001\u955C\u50CF\u5730\u5740\u53CA\u62C9\u53D6\u6743\u9650\u3002";
|
|
228
231
|
export declare class FunctionService {
|
|
229
232
|
private environment;
|
|
230
233
|
private vpcService;
|