dsh-session-superagent 0.9.115 → 0.9.116
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/CHANGELOG.md +28 -0
- package/README.md +1 -1
- package/client.js +1 -1
- package/lib/gh-format.js +465 -465
- package/lib/index.js +2290 -2289
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
格式参照 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [0.9.116] - 2026-11-03 —— 404 不等于"不存在";顺便修掉一个"凌晨才红"的用例
|
|
6
|
+
|
|
7
|
+
### 学到什么(出处)
|
|
8
|
+
GitHub《Troubleshooting the REST API》:
|
|
9
|
+
> If you make a request to access a private resource and your request isn't properly authenticated,
|
|
10
|
+
> you will receive a `404 Not Found` response. GitHub uses `404` instead of `403` **to avoid confirming
|
|
11
|
+
> the existence of private repositories.**
|
|
12
|
+
|
|
13
|
+
出处:<https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api#404-not-found-for-an-existing-resource>
|
|
14
|
+
|
|
15
|
+
也就是说:**404 既可能是"不存在",也可能是"没权限"**,而且这两种情况的修复动作完全不同。
|
|
16
|
+
|
|
17
|
+
### 改了什么
|
|
18
|
+
1. `notfound` 的提示改写为:`(不存在或没权限 —— 私有仓库无权限也回 404:查 owner/name 与 token)`(47 字符,未超门禁 60);
|
|
19
|
+
2. `repo_here` 工具失败时也走 `formatGhCall()`(与 `github` 工具一致,0.9.115 漏了它)。
|
|
20
|
+
|
|
21
|
+
### 顺带抓到一个"凌晨才红"的用例
|
|
22
|
+
`顶部四个计数必须加得上总数` 里把时段写死成 `03:00-04:00`:
|
|
23
|
+
- 白天跑 → 该守在窗口外,计数里出现「时段外」,用例绿;
|
|
24
|
+
- **凌晨 3 点跑 → 该守就在窗口内**,`时段外` 这一项消失,`value('时段外')` 得到 `NaN`,用例红。
|
|
25
|
+
|
|
26
|
+
改成 `outsideWindow()`:从当前小时 +6 开始、长度 1 小时,任何时刻都在窗口外。
|
|
27
|
+
|
|
28
|
+
### 证据
|
|
29
|
+
```
|
|
30
|
+
node --test → 223/223(此前凌晨跑会 221/223)
|
|
31
|
+
```
|
|
32
|
+
|
|
5
33
|
## [0.9.115] - 2026-11-03 —— `github` 工具失败时也带「下一步」和机器可读的 kind
|
|
6
34
|
|
|
7
35
|
### 为什么
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<img src="assets/icon-180.png" width="88" height="88" alt="">
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
|
-
[](https://github.com/MYCF711/dsh-session-superagent/releases)
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-session-superagent)
|
|
8
8
|
[](https://github.com/topics/dsh-plugin)
|
|
9
9
|
|
package/client.js
CHANGED
|
@@ -14,7 +14,7 @@ window.__ModuleLoader__.load({
|
|
|
14
14
|
const { useCallback, useEffect, useRef, useState } = React
|
|
15
15
|
|
|
16
16
|
// 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
|
|
17
|
-
const CLIENT_VERSION = '0.9.
|
|
17
|
+
const CLIENT_VERSION = '0.9.116'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|