@cloudbase/manager-node 4.2.7 → 4.2.9
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/env/index.js +8 -4
- package/lib/function/index.js +3 -0
- package/lib/storage/index.js +8 -4
- package/package.json +1 -1
- package/types/function/types.d.ts +2 -0
package/lib/env/index.js
CHANGED
|
@@ -260,11 +260,15 @@ class EnvService {
|
|
|
260
260
|
SecretKey: secretKey,
|
|
261
261
|
SecurityToken: token,
|
|
262
262
|
Domain: constant_1.USE_INTERNAL_ENDPOINT ? "{Bucket}.cos-internal.{Region}.tencentcos.cn" /* INTERNAL */ : "{Bucket}.cos.{Region}.tencentcos.cn" /* PUBLIC */,
|
|
263
|
-
Protocol: constant_1.USE_INTERNAL_ENDPOINT
|
|
264
|
-
? 'http:'
|
|
265
|
-
: (constant_1.COS_SDK_PROTOCOL === null || constant_1.COS_SDK_PROTOCOL === void 0 ? void 0 : constant_1.COS_SDK_PROTOCOL.endsWith(':')) ? constant_1.COS_SDK_PROTOCOL.toLowerCase()
|
|
266
|
-
: constant_1.COS_SDK_PROTOCOL.toLowerCase() + ':'
|
|
267
263
|
};
|
|
264
|
+
if (constant_1.COS_SDK_PROTOCOL) {
|
|
265
|
+
cosConfig.Protocol = constant_1.COS_SDK_PROTOCOL.endsWith(':')
|
|
266
|
+
? constant_1.COS_SDK_PROTOCOL.toLowerCase()
|
|
267
|
+
: constant_1.COS_SDK_PROTOCOL.toLowerCase() + ':';
|
|
268
|
+
}
|
|
269
|
+
if (constant_1.USE_INTERNAL_ENDPOINT) {
|
|
270
|
+
cosConfig.Protocol = 'http:';
|
|
271
|
+
}
|
|
268
272
|
return new cos_nodejs_sdk_v5_1.default(cosConfig);
|
|
269
273
|
}
|
|
270
274
|
getStorageConfig() {
|
package/lib/function/index.js
CHANGED
|
@@ -146,6 +146,9 @@ class FunctionService {
|
|
|
146
146
|
functionPath,
|
|
147
147
|
functionRootPath
|
|
148
148
|
}, params.InstallDependency);
|
|
149
|
+
const { TopicId, LogsetId } = this.getClsServiceConfig();
|
|
150
|
+
params.ClsTopicId = TopicId;
|
|
151
|
+
params.ClsLogsetId = LogsetId;
|
|
149
152
|
try {
|
|
150
153
|
// 创建云函数
|
|
151
154
|
const res = await this.scfService.request('CreateFunction', params);
|
package/lib/storage/index.js
CHANGED
|
@@ -848,11 +848,15 @@ class StorageService {
|
|
|
848
848
|
Proxy: cosProxy || proxy,
|
|
849
849
|
SecurityToken: token,
|
|
850
850
|
Domain: constant_1.USE_INTERNAL_ENDPOINT ? "{Bucket}.cos-internal.{Region}.tencentcos.cn" /* INTERNAL */ : "{Bucket}.cos.{Region}.tencentcos.cn" /* PUBLIC */,
|
|
851
|
-
Protocol: constant_1.USE_INTERNAL_ENDPOINT
|
|
852
|
-
? 'http:'
|
|
853
|
-
: (constant_1.COS_SDK_PROTOCOL === null || constant_1.COS_SDK_PROTOCOL === void 0 ? void 0 : constant_1.COS_SDK_PROTOCOL.endsWith(':')) ? constant_1.COS_SDK_PROTOCOL.toLowerCase()
|
|
854
|
-
: constant_1.COS_SDK_PROTOCOL.toLowerCase() + ':'
|
|
855
851
|
};
|
|
852
|
+
if (constant_1.COS_SDK_PROTOCOL) {
|
|
853
|
+
cosConfig.Protocol = constant_1.COS_SDK_PROTOCOL.endsWith(':')
|
|
854
|
+
? constant_1.COS_SDK_PROTOCOL.toLowerCase()
|
|
855
|
+
: constant_1.COS_SDK_PROTOCOL.toLowerCase() + ':';
|
|
856
|
+
}
|
|
857
|
+
if (constant_1.USE_INTERNAL_ENDPOINT) {
|
|
858
|
+
cosConfig.Protocol = 'http:';
|
|
859
|
+
}
|
|
856
860
|
// COSSDK 默认开启 KeepAlive,这里提供关闭的方式
|
|
857
861
|
if (constant_1.COS_SDK_KEEPALIVE) {
|
|
858
862
|
cosConfig.KeepAlive = { true: true, false: false }[constant_1.COS_SDK_KEEPALIVE];
|
package/package.json
CHANGED