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.
@@ -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
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "ZIP 中文文件名修复器",
4
+ "description": "修复 ZIP 压缩包与已解压目录中的中文文件名乱码:嗅探 GBK/GB18030/Big5 条目名编码,按正确文件名解压并逐条校验 CRC32,生成置位 UTF-8 文件名标志的修复版 ZIP;对已丢失字节的 U+FFFD 乱码,按 (size, CRC32) 与源包精确配对还原,并用编码指纹验证反推的名字。绝不删除、绝不覆盖原文件。"
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
+ }