@cloudbase/manager-node 4.4.1 → 4.4.3-beta.0

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.
@@ -406,7 +406,6 @@ class FunctionService {
406
406
  LogRequestId: logRequestId,
407
407
  EndTime: endTime
408
408
  };
409
- console.log("params", params);
410
409
  const res = await this.tcbService.request('GetFunctionLogDetail', params);
411
410
  return res;
412
411
  }
@@ -459,7 +458,24 @@ class FunctionService {
459
458
  }));
460
459
  params.Layers = transformLayers;
461
460
  }
462
- return this.scfService.request('UpdateFunctionConfiguration', params);
461
+ try {
462
+ // 如果函数配置中包含触发器,则更新触发器
463
+ if (func.triggers && func.triggers.length > 0) {
464
+ try {
465
+ await this.createFunctionTriggers(func.name, func.triggers);
466
+ }
467
+ catch (triggerError) {
468
+ // 如果触发器创建失败,记录警告
469
+ console.warn(`[${func.name}] 触发器更新失败:${triggerError.message}`);
470
+ }
471
+ }
472
+ return this.scfService.request('UpdateFunctionConfiguration', params);
473
+ }
474
+ catch (e) {
475
+ throw new error_1.CloudBaseError(`[${func.name}] 更新函数配置失败:${e.message}`, {
476
+ code: e.code
477
+ });
478
+ }
463
479
  }
464
480
  /**
465
481
  *
@@ -227,7 +227,6 @@ class HostingService {
227
227
  let CdnDomain;
228
228
  // 2 分钟有效
229
229
  if ((cacheHosting === null || cacheHosting === void 0 ? void 0 : cacheHosting.cacheTime) && Number(cacheHosting === null || cacheHosting === void 0 ? void 0 : cacheHosting.cacheTime) + 120000 < Date.now()) {
230
- console.log('cache');
231
230
  CdnDomain = cacheHosting.CdnDomain;
232
231
  }
233
232
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/manager-node",
3
- "version": "4.4.1",
3
+ "version": "4.4.3-beta.0",
4
4
  "description": "The node manage service api for cloudbase.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {