@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.
@@ -393,7 +393,7 @@ class FunctionService {
393
393
  * endTime: string
394
394
  * logRequestId: string
395
395
  * }} options
396
- * @returns {Promise<IFunctionLogRes>}
396
+ * @returns {Promise<IFunctionLogDetailRes>}
397
397
  */
398
398
  async getFunctionLogDetail(options) {
399
399
  let { logRequestId, startTime, endTime } = options;
@@ -241,10 +241,10 @@ exports.formatTimeByMs = formatTimeByMs;
241
241
  const getCompleteTimeRange = (timeRange) => {
242
242
  let { startTime, endTime } = timeRange;
243
243
  if (!startTime && !endTime) {
244
- // 都不传则 startTime 为当前时间,endTime 为 startTime + 1d
244
+ // 都不传则 endTime 为当前时间,startTime 为 startTime - 1d
245
245
  const curTime = new Date().getTime();
246
- startTime = (0, exports.formatTimeByMs)(curTime);
247
- endTime = (0, exports.formatTimeByMs)(curTime + 24 * 3600 * 1000);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/manager-node",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "description": "The node manage service api for cloudbase.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -264,7 +264,7 @@ export declare class FunctionService {
264
264
  * endTime: string
265
265
  * logRequestId: string
266
266
  * }} options
267
- * @returns {Promise<IFunctionLogRes>}
267
+ * @returns {Promise<IFunctionLogDetailRes>}
268
268
  */
269
269
  getFunctionLogDetail(options: IFunctionLogDetailOptions): Promise<IFunctionLogDetailRes>;
270
270
  /**