@dreamor/atlas-cli 0.7.18 → 0.7.20

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.
@@ -45,8 +45,16 @@ export async function refreshSession(opts = {}) {
45
45
  }
46
46
  try {
47
47
  const ctx = await browser.newContext();
48
- // 灌入已有 cookie。playwright 严格校验 cookie 字段,需要补齐 path/secure 等。
49
- const cookiesForContext = existing.map((c) => ({
48
+ // 灌入已有 cookie,但剥离失效的 access_token 及相关签名 cookies
49
+ // (access_token.sig / refresh_token / refresh_token.sig)—— 强制
50
+ // SSO 用 SSO_REFRESH_TOKEN 换发全套新 token,防止 still_valid 假阳性。
51
+ // 注:实际工时 API 会校验 token + signature 匹配,只换 access_token
52
+ // 不换 sig 同样会被拒绝。
53
+ // playwright 严格校验 cookie 字段,需要补齐 path/secure 等。
54
+ const tokenNames = new Set(['access_token', 'access_token.sig', 'refresh_token', 'refresh_token.sig']);
55
+ const cookiesForContext = existing
56
+ .filter((c) => !tokenNames.has(c.name))
57
+ .map((c) => ({
50
58
  name: c.name,
51
59
  value: c.value,
52
60
  domain: c.domain ?? '.alibaba-inc.com',
@@ -1 +1 @@
1
- export const ATLAS_VERSION = '0.7.18';
1
+ export const ATLAS_VERSION = '0.7.20';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamor/atlas-cli",
3
- "version": "0.7.18",
3
+ "version": "0.7.20",
4
4
  "description": "Atlas CLI - 斑马云图人力基线管理工具",
5
5
  "type": "module",
6
6
  "bin": {
@@ -49,6 +49,6 @@
49
49
  "esbuild": "^0.28.1",
50
50
  "tsx": "^4.19.0",
51
51
  "typescript": "^5.6.0",
52
- "vitest": "^2.1.0"
52
+ "vitest": "^4.1.9"
53
53
  }
54
54
  }