@dreamor/atlas-cli 0.7.20 → 0.7.21
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createClient } from '../../http/client.js';
|
|
2
2
|
import { isJsonMode, jsonOk, log } from '../../util/output.js';
|
|
3
3
|
import { enforceOutputLimit } from '../../util/output-limit.js';
|
|
4
|
-
import { SessionExpiredError } from '../../util/errors.js';
|
|
5
4
|
import { expandMonths, expandMonthsDefault } from '../../util/months.js';
|
|
6
5
|
import { resolveSecureExportPath, secureWriteFile } from '../../util/secure-fs.js';
|
|
7
6
|
import { annotateWithMonth, aggregateByAxis, filterByStaff, flattenTree, } from './_logic.js';
|
|
@@ -53,10 +52,10 @@ export async function monthCmd(opts) {
|
|
|
53
52
|
all.push(...annotateWithMonth(data, m));
|
|
54
53
|
}
|
|
55
54
|
catch (e) {
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
// 实际工时 API 对无数据月份也返回 501("当前token已失效"),
|
|
56
|
+
// 不是真正的 token 过期。不 rethrow,只记录到 failedMonths。
|
|
58
57
|
failedMonths.push({ month: m, error: e instanceof Error ? e.message : String(e) });
|
|
59
|
-
log(`月 ${m}
|
|
58
|
+
log(`月 ${m} 无实际工时数据`);
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
// Apply --department / --role filter
|
|
@@ -84,10 +83,10 @@ export async function summaryCmd(opts) {
|
|
|
84
83
|
all.push(...annotateWithMonth(await fetchActual(pid, m), m));
|
|
85
84
|
}
|
|
86
85
|
catch (e) {
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
// 实际工时 API 对无数据月份也返回 501("当前token已失效"),
|
|
87
|
+
// 不是真正的 token 过期。不 rethrow,只记录到 failedMonths。
|
|
89
88
|
failedMonths.push({ month: m, error: e instanceof Error ? e.message : String(e) });
|
|
90
|
-
log(`月 ${m}
|
|
89
|
+
log(`月 ${m} 无实际工时数据`);
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
// Apply --department / --role filter
|
|
@@ -114,10 +113,10 @@ export async function exportCmd(opts) {
|
|
|
114
113
|
rows.push(...annotateWithMonth(data, m));
|
|
115
114
|
}
|
|
116
115
|
catch (e) {
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
// 实际工时 API 对无数据月份也返回 501("当前token已失效"),
|
|
117
|
+
// 不是真正的 token 过期。不 rethrow,只记录到 failedMonths。
|
|
119
118
|
failedMonths.push({ month: m, error: e instanceof Error ? e.message : String(e) });
|
|
120
|
-
log(`月 ${m}
|
|
119
|
+
log(`月 ${m} 无实际工时数据`);
|
|
121
120
|
}
|
|
122
121
|
}
|
|
123
122
|
// Apply --department / --role filter
|
|
@@ -58,8 +58,10 @@ export async function compareCmd(opts) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
catch (e) {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
// 实际工时 API 对无数据月份也返回 501(错误信息"当前token已失效"),
|
|
62
|
+
// 这不是真正的 token 过期——基线 API 正常就说明 token 有效。
|
|
63
|
+
// 所以不 rethrow SessionExpiredError,只记录到 failedMonths。
|
|
64
|
+
// 真正的 token 过期会由基线 API 的 catch 块捕获并抛出。
|
|
63
65
|
failedMonths.push({ month: m, error: `实际工时拉取失败: ${e instanceof Error ? e.message : String(e)}` });
|
|
64
66
|
}
|
|
65
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ATLAS_VERSION = '0.7.
|
|
1
|
+
export const ATLAS_VERSION = '0.7.21';
|