@lark-apaas/miaoda-cli 0.1.2-alpha.b2b5ae5 → 0.1.2-alpha.c7d0c89

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.
@@ -42,6 +42,8 @@ const GRANULARITY_TO_UNIT = {
42
42
  day: "DAY",
43
43
  daily: "DAY",
44
44
  "1d": "DAY",
45
+ "1h": "HOUR",
46
+ hour: "HOUR",
45
47
  week: "WEEK",
46
48
  weekly: "WEEK",
47
49
  "1w": "WEEK",
@@ -72,9 +74,8 @@ async function handleObservabilityAnalytics(opts) {
72
74
  const timeAggregationUnit = opts.granularity
73
75
  ? (GRANULARITY_TO_UNIT[opts.granularity] ?? opts.granularity.toUpperCase())
74
76
  : "DAY";
75
- // until 按 timeAggregationUnit 桶向上对齐,避免末桶数据丢失;since 保持原值。
76
77
  const nowMs = Date.now();
77
- const sinceMs = (0, helpers_1.parseToMs)(opts.since) ?? nowMs - 7 * 86_400_000;
78
+ const sinceMs = (0, helpers_1.parseToMs)(opts.since) ?? nowMs - 30 * 86_400_000;
78
79
  const untilMs = (0, helpers_1.parseToMs)(opts.until) ?? nowMs;
79
80
  const bucket = timeAggregationUnit;
80
81
  const fieldFilters = (0, helpers_1.buildFieldFilters)([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/miaoda-cli",
3
- "version": "0.1.2-alpha.b2b5ae5",
3
+ "version": "0.1.2-alpha.c7d0c89",
4
4
  "description": "Miaoda 平台命令行工具,面向 Agent 调用",
5
5
  "type": "commonjs",
6
6
  "bin": {