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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "ZIP Filename Fixer",
|
|
4
|
+
"description": "Repairs mojibake Chinese filenames inside ZIP archives and already-extracted folders: sniffs GBK/GB18030/Big5 entry names, extracts with correct names and per-entry CRC32 verification, writes a repaired ZIP with the UTF-8 filename flag set, pairs irreversible U+FFFD damage against a source ZIP by (size, CRC32), and verifies reconstructed names by encoding fingerprint. Never deletes or overwrites the originals."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/ui/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-zipfix-ui 的 Host 半:注册侧边栏 UI 使用的 `/zipfix-api` HTTP 接口。
|
|
3
|
+
*
|
|
4
|
+
* 修复逻辑完全复用 `dsh-zipfix` 包的 lib(与 5 个 agent 工具同一套实现),
|
|
5
|
+
* 本包只负责「浏览器上传 → 本机处理 → 下载/解压」的搬运与安全边界。
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { installZipfixWebApi } from '../plugin/lib/webapi.js';
|
|
9
|
+
|
|
10
|
+
/** Cordis 插件名。 */
|
|
11
|
+
export const name = 'dsh-zipfix-ui';
|
|
12
|
+
|
|
13
|
+
/** 无硬依赖:webServer 缺失时静默降级(不阻塞同仓的 agent 工具包)。 */
|
|
14
|
+
export const inject = [];
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 注册 HTTP API,并随插件卸载释放路由与临时目录。
|
|
18
|
+
* @param {object} ctx Host 插件上下文
|
|
19
|
+
*/
|
|
20
|
+
export function apply(ctx) {
|
|
21
|
+
ctx.effect(() => installZipfixWebApi(ctx), 'zipfix-ui: web api');
|
|
22
|
+
}
|