@cloudbase/manager-node 4.4.0 → 4.4.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/function/index.js +1 -2
- package/lib/hosting/index.js +0 -1
- package/lib/utils/index.js +3 -3
- package/package.json +1 -1
- package/types/function/index.d.ts +1 -1
package/lib/function/index.js
CHANGED
|
@@ -393,7 +393,7 @@ class FunctionService {
|
|
|
393
393
|
* endTime: string
|
|
394
394
|
* logRequestId: string
|
|
395
395
|
* }} options
|
|
396
|
-
* @returns {Promise<
|
|
396
|
+
* @returns {Promise<IFunctionLogDetailRes>}
|
|
397
397
|
*/
|
|
398
398
|
async getFunctionLogDetail(options) {
|
|
399
399
|
let { logRequestId, startTime, endTime } = options;
|
|
@@ -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
|
}
|
package/lib/hosting/index.js
CHANGED
|
@@ -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/lib/utils/index.js
CHANGED
|
@@ -241,10 +241,10 @@ exports.formatTimeByMs = formatTimeByMs;
|
|
|
241
241
|
const getCompleteTimeRange = (timeRange) => {
|
|
242
242
|
let { startTime, endTime } = timeRange;
|
|
243
243
|
if (!startTime && !endTime) {
|
|
244
|
-
// 都不传则
|
|
244
|
+
// 都不传则 endTime 为当前时间,startTime 为 startTime - 1d
|
|
245
245
|
const curTime = new Date().getTime();
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
endTime = (0, exports.formatTimeByMs)(curTime);
|
|
247
|
+
startTime = (0, exports.formatTimeByMs)(curTime - 24 * 3600 * 1000);
|
|
248
248
|
}
|
|
249
249
|
if (startTime && !endTime) {
|
|
250
250
|
// 自动补 endTime 为 startTime + 1d
|
package/package.json
CHANGED
|
@@ -264,7 +264,7 @@ export declare class FunctionService {
|
|
|
264
264
|
* endTime: string
|
|
265
265
|
* logRequestId: string
|
|
266
266
|
* }} options
|
|
267
|
-
* @returns {Promise<
|
|
267
|
+
* @returns {Promise<IFunctionLogDetailRes>}
|
|
268
268
|
*/
|
|
269
269
|
getFunctionLogDetail(options: IFunctionLogDetailOptions): Promise<IFunctionLogDetailRes>;
|
|
270
270
|
/**
|