dsh-zipfix 0.0.0-stage → 0.4.0
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/LICENSE +21 -0
- package/README.md +34 -2
- package/client.js +871 -0
- package/cordis.patch.yml +4 -0
- package/icon.svg +9 -0
- package/index.js +18 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +77 -4
- package/plugin/index.js +633 -0
- package/plugin/lib/detect.js +436 -0
- package/plugin/lib/encoding.js +369 -0
- package/plugin/lib/fix.js +1228 -0
- package/plugin/lib/report.js +135 -0
- package/plugin/lib/webapi.js +597 -0
- package/plugin/lib/zip.js +842 -0
- package/plugin/locale/en.json +6 -0
- package/plugin/locale/zh.json +6 -0
- package/ui/index.js +22 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-zipfix contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-zipfix
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DeepSeek Harness 插件:修复 ZIP 压缩包与已解压目录中的中文文件名乱码。提供 5 个 agent 工具和一个侧边栏上传面板。
|
|
4
|
+
|
|
5
|
+
## 功能
|
|
6
|
+
|
|
7
|
+
- 读取 ZIP 中央目录原始文件名字节,嗅探 UTF-8 / GBK / GB18030 / Big5 编码
|
|
8
|
+
- 按正确文件名解压,逐条校验 CRC32;生成置位 UTF-8 文件名标志(0x0800)的修复版 ZIP
|
|
9
|
+
- 对 U+FFFD 不可逆乱码,按源包 `(size, CRC32)` 唯一配对还原,并用编码指纹验证
|
|
10
|
+
- 5 个工具:`zipfix_scan`、`zipfix_fix_zip`、`zipfix_rename_dir`、`zipfix_match_source`、`zipfix_verify_names`
|
|
11
|
+
- 侧边栏「ZIP 修复」:上传 ZIP → 体检 → 下载修复版 ZIP / 按正确文件名解压
|
|
12
|
+
|
|
13
|
+
## 安装
|
|
14
|
+
|
|
15
|
+
DSH 插件市场(发现 → 添加索引源):
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
https://raw.githubusercontent.com/zhibo0502/dsh-zipfix/main/plugin-index.json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
本地目录安装:
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
plugin_manager { action: "install_bundle", target: "<本目录绝对路径>" }
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 安全
|
|
28
|
+
|
|
29
|
+
- 绝不删除、绝不覆盖源文件;同名目标自动加 `_fixed` 后缀;写操作默认 dry-run
|
|
30
|
+
- `/zipfix-api` 所有路由先经 `connection.requestRejection` 宿主认证(fail closed)
|
|
31
|
+
- 零运行时依赖,无网络请求
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
MIT · https://github.com/zhibo0502/dsh-zipfix
|