dsh-tool-archive

把目录打成确定性 tar、不解包就列出内容、解包时逐个成员拒绝任何能写到目标目录之外的名字、并用 SHA-256 核对「解出来的东西 == 打进去的东西」。零外部依赖 —— tar 格式在这个插件里自己写、自己读。读比写更宽容是刻意的:读方的职责是如实报告归档说了什么,写方则绝不能写出自己读不回来的东西。tar 没有中央索引,所以遍历必须跟踪「有没有走到归档结束标记」—— 少了这一步,一个被截断的文件校验和照样正确、照样被读成完整。

插件介绍

把目录打成确定性 tar、不解包就列出内容、解包时逐个成员拒绝任何能写到目标目录之外的名字、并用 SHA-256 核对「解出来的东西 == 打进去的东西」。零外部依赖 —— tar 格式在这个插件里自己写、自己读。读比写更宽容是刻意的:读方的职责是如实报告归档说了什么,写方则绝不能写出自己读不回来的东西。tar 没有中央索引,所以遍历必须跟踪「有没有走到归档结束标记」—— 少了这一步,一个被截断的文件校验和照样正确、照样被读成完整。

安装方式

通过 npm 安装

dsh plugin --profile web add dsh-tool-archive

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

从 GitHub 安装

dsh plugin --profile web add github:yuehancn/dsh-tool-archive

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

版本兼容情况

兼容性待确认。可前往项目文档查看支持版本。

安装提示

  • 可能调用终端命令