@cloudbase/manager-node 4.4.0 → 4.4.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.
- package/lib/function/index.js +1 -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;
|
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
|
/**
|