{"_id":"@d-matrix/proto-to-ts","_rev":"6-63e3fb927e30628052f640989690acfd","name":"@d-matrix/proto-to-ts","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"@d-matrix/proto-to-ts","version":"0.1.0","keywords":["mcp","proto","typescript"],"license":"MIT","_id":"@d-matrix/proto-to-ts@0.1.0","maintainers":[{"name":"novaline","email":"novaline.dulin@gmail.com"}],"homepage":"https://github.com/mrdulin/dm-proto-to-ts#readme","bugs":{"url":"https://github.com/mrdulin/dm-proto-to-ts/issues"},"bin":{"proto-to-ts":"dist/index.js"},"dist":{"shasum":"34f1635a711c1689aa2c22e8384e07f05f8d7faf","tarball":"https://registry.npmjs.org/@d-matrix/proto-to-ts/-/proto-to-ts-0.1.0.tgz","fileCount":10,"integrity":"sha512-7s9XIXxJGzirfXqe2FReIVTDx04BVuOleUq/WDq3RYFbJVCH2YUXuHkjUIgz/IjrL8TPRQMP05edVyDCBcnpEQ==","signatures":[{"sig":"MEUCIQCaBpMKD1SD1YqrPJZZMnLeZAffqIWWvAtc3gvWknRwTQIgehcnurffTyuJ1PCiesY/tty6cX13wGSX+oO2k2OKyP8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3876243},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"bdefcf87487831a1ca3852d50fd62bb0dda67dd1","scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json","start":"node dist/index.js","typecheck":"tsc -p tsconfig.json --noEmit","_gen_proto":"node ./scripts/gen-proto.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"novaline","email":"novaline.dulin@gmail.com"},"repository":{"url":"git+https://github.com/mrdulin/dm-proto-to-ts.git","type":"git"},"_npmVersion":"11.12.1","description":"MCP server for generating TypeScript from .proto files into a user-specified output directory.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^3.25.76","@modelcontextprotocol/sdk":"^1.17.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","ts-proto":"^1.181.2","typescript":"^5.8.3","@types/node":"^22.15.30"},"_npmOperationalInternal":{"tmp":"tmp/proto-to-ts_0.1.0_1779416015663_0.18049998415212865","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@d-matrix/proto-to-ts","version":"0.2.2","keywords":["mcp","proto","typescript"],"author":{"name":"Lin Du"},"license":"MIT","_id":"@d-matrix/proto-to-ts@0.2.2","maintainers":[{"name":"novaline","email":"novaline.dulin@gmail.com"}],"homepage":"https://github.com/mrdulin/dm-proto-to-ts#readme","bugs":{"url":"https://github.com/mrdulin/dm-proto-to-ts/issues"},"bin":{"proto-to-ts":"bin/proto-to-ts.js"},"dist":{"shasum":"cac48609a540603568b15f7b306b468e1dda2967","tarball":"https://registry.npmjs.org/@d-matrix/proto-to-ts/-/proto-to-ts-0.2.2.tgz","fileCount":11,"integrity":"sha512-3z9docgaZuF+F/EBAwn+fT+kY5FL6Cfn6lnWSNzKDnKVcda2K9jVTAB5StEP7k0J83t1FTTR1pUP8fbKCB6TIA==","signatures":[{"sig":"MEUCIQD10D7aMcHnEjZuTJGDI5ZVWJslqK0ME8aKsojaxqAoywIgU24eYixVn6dqlfb+oVDKYPkjNjj+AQzoZEv4Pe556fI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3876763},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"0ebcc1ea69fb30663057050247fac9b109cdb971","scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json","start":"node dist/index.js","wait3s":"node -e \"setTimeout(() => process.exit(0), 3000)\"","cnpm:sync":"cnpm sync %npm_package_name%","typecheck":"tsc -p tsconfig.json --noEmit","_gen_proto":"node ./scripts/gen-proto.mjs","postpublish":"echo \"wait for 3 seconds, then sync cnpm\" && npm run wait3s && npm run cnpm:sync","prepublishOnly":"npm run build"},"_npmUser":{"name":"novaline","email":"novaline.dulin@gmail.com"},"repository":{"url":"git+https://github.com/mrdulin/dm-proto-to-ts.git","type":"git"},"_npmVersion":"11.12.1","description":"MCP server for generating TypeScript from .proto files into a user-specified output directory.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^3.25.76","@modelcontextprotocol/sdk":"^1.17.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","cnpm":"^9.4.0","ts-proto":"^1.181.2","typescript":"^5.8.3","@types/node":"^22.15.30"},"_npmOperationalInternal":{"tmp":"tmp/proto-to-ts_0.2.2_1779418321718_0.1443253940961875","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@d-matrix/proto-to-ts","version":"0.2.3","keywords":["mcp","proto","typescript"],"author":{"name":"Lin Du"},"license":"MIT","_id":"@d-matrix/proto-to-ts@0.2.3","maintainers":[{"name":"novaline","email":"novaline.dulin@gmail.com"}],"homepage":"https://github.com/mrdulin/dm-proto-to-ts#readme","bugs":{"url":"https://github.com/mrdulin/dm-proto-to-ts/issues"},"bin":{"proto-to-ts":"bin/proto-to-ts.js"},"dist":{"shasum":"7acbbf68f6efe3080be00cbfe11666b4d1030a5f","tarball":"https://registry.npmjs.org/@d-matrix/proto-to-ts/-/proto-to-ts-0.2.3.tgz","fileCount":11,"integrity":"sha512-Dq13kDNjoifYKxeYyCAYN4btJrZVHn7IwPD893IvAi48NHVG5e9nT+UOSuuYvPY26WwQLrZWVTxggo0wcJUMjg==","signatures":[{"sig":"MEYCIQCqFMnNTpJJZ4kA3Dv/41WWcvfyJ481Mgk37grdKlSVMAIhAJcYO6ojbd9psjlmrbDhsYtqhz3/tI7IWPPZMGXpe5a4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3876763},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"fbc08225f41300b37e7cc71989b27fe1fbde2b44","scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json","start":"node dist/index.js","wait3s":"node -e \"setTimeout(() => process.exit(0), 3000)\"","cnpm:sync":"cnpm sync %npm_package_name%","typecheck":"tsc -p tsconfig.json --noEmit","_gen_proto":"node ./scripts/gen-proto.mjs","postpublish":"echo \"wait for 3 seconds, then sync cnpm\" && npm run wait3s && npm run cnpm:sync","prepublishOnly":"npm run build"},"_npmUser":{"name":"novaline","email":"novaline.dulin@gmail.com"},"repository":{"url":"git+https://github.com/mrdulin/dm-proto-to-ts.git","type":"git"},"_npmVersion":"11.12.1","description":"MCP server for generating TypeScript from .proto files into a user-specified output directory.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^3.25.76","ts-proto":"^1.181.2","@modelcontextprotocol/sdk":"^1.17.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","cnpm":"^9.4.0","typescript":"^5.8.3","@types/node":"^22.15.30"},"_npmOperationalInternal":{"tmp":"tmp/proto-to-ts_0.2.3_1779419596204_0.5809618170888304","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@d-matrix/proto-to-ts","version":"0.3.0","keywords":["cli","proto","typescript"],"author":{"name":"Lin Du"},"license":"MIT","_id":"@d-matrix/proto-to-ts@0.3.0","maintainers":[{"name":"novaline","email":"novaline.dulin@gmail.com"}],"homepage":"https://github.com/mrdulin/dm-proto-to-ts#readme","bugs":{"url":"https://github.com/mrdulin/dm-proto-to-ts/issues"},"bin":{"proto-to-ts":"bin/proto-to-ts.js"},"dist":{"shasum":"ae8db9483f070d4a62a14b90f9e55da1d4d98737","tarball":"https://registry.npmjs.org/@d-matrix/proto-to-ts/-/proto-to-ts-0.3.0.tgz","fileCount":10,"integrity":"sha512-lbjIp5HwQZ9OaQ+ymHQDFVAkpVzLcJ3X3X+VDEA2g+zPdoECY1pCSC+lJOVY2BrTHXTRbGalK/rtK9TzS7RGcQ==","signatures":[{"sig":"MEYCIQCulZxt5YCZtwprXoez3SskWCRWf9cy4eIQpcnhIukihwIhAP8G9AfykOYfViuZrNGbmbdB1IjfWh2RrSE5WODMYX1O","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3873971},"type":"module","engines":{"node":">=18"},"gitHead":"fec3be3dfc19e130f1786723cedc1c8ab89ee719","scripts":{"dev":"npm run build && tsx src/index.ts","build":"tsc -p tsconfig.json","start":"node dist/index.js","wait3s":"node -e \"setTimeout(() => process.exit(0), 3000)\"","cnpm:sync":"cnpm sync %npm_package_name%","typecheck":"tsc -p tsconfig.json --noEmit","postpublish":"echo \"wait for 3 seconds, then sync cnpm\" && npm run wait3s && npm run cnpm:sync","prepublishOnly":"npm run build"},"_npmUser":{"name":"novaline","email":"novaline.dulin@gmail.com"},"repository":{"url":"git+https://github.com/mrdulin/dm-proto-to-ts.git","type":"git"},"_npmVersion":"11.16.0","description":"Windows-only Node CLI for generating TypeScript from .proto files into a user-specified output directory.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"ts-proto":"^1.181.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.4","cnpm":"^9.4.0","typescript":"^5.8.3","@types/node":"^22.15.30"},"_npmOperationalInternal":{"tmp":"tmp/proto-to-ts_0.3.0_1783596103104_0.7669550781621441","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@d-matrix/proto-to-ts","version":"0.4.0","keywords":["cli","proto","typescript"],"author":{"name":"Lin Du"},"license":"MIT","_id":"@d-matrix/proto-to-ts@0.4.0","maintainers":[{"name":"novaline","email":"novaline.dulin@gmail.com"}],"homepage":"https://github.com/mrdulin/dm-proto-to-ts#readme","bugs":{"url":"https://github.com/mrdulin/dm-proto-to-ts/issues"},"bin":{"proto-to-ts":"bin/proto-to-ts.js"},"dist":{"shasum":"64f9677fe017b0d5949ce6412043091e88b1efb9","tarball":"https://registry.npmjs.org/@d-matrix/proto-to-ts/-/proto-to-ts-0.4.0.tgz","fileCount":11,"integrity":"sha512-7+1Us4dfgnS9WIhuuLlm/0fU0mbDFM5TxmFvV4SAAA9P5gdbB8PYwsIGgY4AS2eKPVfKiV3Wn7z2vQRJOVVQoQ==","signatures":[{"sig":"MEQCIBsW4ptjio6l9WiHpvs1T/lXdn2s8AocFUsogcuir6RFAiAqgi6DbIP0MnYjPkyxJJZnDHES/CurAmiLDu+RxSE7jg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3882825},"type":"module","engines":{"node":">=16.13"},"gitHead":"208c750dfee77d0821f783222c0e4e18f8f71114","scripts":{"dev":"npm run build && node dist/index.js","test":"npm run build && mocha \"dist/services/**/*.test.js\"","build":"tsc -p tsconfig.json","start":"node dist/index.js","wait3s":"node -e \"setTimeout(() => process.exit(0), 3000)\"","cnpm:sync":"cnpm sync %npm_package_name%","typecheck":"tsc -p tsconfig.json --noEmit","postpublish":"echo \"wait for 3 seconds, then sync cnpm\" && npm run wait3s && npm run cnpm:sync","prepublishOnly":"npm run build"},"_npmUser":{"name":"novaline","email":"novaline.dulin@gmail.com"},"repository":{"url":"git+https://github.com/mrdulin/dm-proto-to-ts.git","type":"git"},"_npmVersion":"11.16.0","description":"Windows-only Node CLI for generating TypeScript from .proto files into a user-specified output directory.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"ts-proto":"^1.181.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"cnpm":"^9.4.0","mocha":"^10.0.0","typescript":"^5.8.3","@types/node":"^16.18.0","@types/mocha":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/proto-to-ts_0.4.0_1783602206800_0.12224263192472207","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@d-matrix/proto-to-ts","version":"0.4.1","description":"Windows-only Node CLI for generating TypeScript from .proto files into a user-specified output directory.","author":{"name":"Lin Du"},"type":"module","bin":{"proto-to-ts":"bin/proto-to-ts.js"},"scripts":{"build":"tsc -p tsconfig.json","dev":"npm run build && node dist/index.js","prepublishOnly":"npm run build","postpublish":"echo \"wait for 3 seconds, then sync cnpm\" && npm run wait3s && npm run cnpm:sync","start":"node dist/index.js","test":"npm run build && mocha \"dist/services/**/*.test.js\"","wait3s":"node -e \"setTimeout(() => process.exit(0), 3000)\"","cnpm:sync":"cnpm sync %npm_package_name%","typecheck":"tsc -p tsconfig.json --noEmit"},"keywords":["cli","proto","typescript"],"license":"MIT","engines":{"node":">=16.13"},"repository":{"type":"git","url":"git+https://github.com/mrdulin/dm-proto-to-ts.git"},"homepage":"https://github.com/mrdulin/dm-proto-to-ts#readme","bugs":{"url":"https://github.com/mrdulin/dm-proto-to-ts/issues"},"publishConfig":{"access":"public"},"dependencies":{"ts-proto":"^1.181.2"},"devDependencies":{"@types/mocha":"^10.0.0","@types/node":"^16.18.0","cnpm":"^9.4.0","mocha":"^10.0.0","typescript":"^5.8.3"},"gitHead":"a947ab4f281a76de0cdbfef8aee2254301358e25","_id":"@d-matrix/proto-to-ts@0.4.1","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-JvO+YSh+9UsbEVXRLLLct2v/j9rpLE3aADWPlgF0+ZRrzB524RP1mb7G8sWCydOsc8M46H2cWY2QO2VXq0NRzw==","shasum":"f59e2029d4bfe6f6ec5a94d527a23825c7d14b26","tarball":"https://registry.npmjs.org/@d-matrix/proto-to-ts/-/proto-to-ts-0.4.1.tgz","fileCount":11,"unpackedSize":3886201,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEg+3YV0g3gVj9IfXxfS7A0hlyFsS0Rlpk/vbGuQ7ul3AiAUa7SmOgur/xJDvhJ3SCn5VvjyK2VvBN+AINxo/GbZoQ=="}]},"_npmUser":{"name":"novaline","email":"novaline.dulin@gmail.com"},"directories":{},"maintainers":[{"name":"novaline","email":"novaline.dulin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/proto-to-ts_0.4.1_1785311303735_0.7520292176704686"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-22T02:13:35.535Z","modified":"2026-07-29T07:48:24.071Z","0.1.0":"2026-05-22T02:13:35.902Z","0.2.2":"2026-05-22T02:52:01.942Z","0.2.3":"2026-05-22T03:13:16.475Z","0.3.0":"2026-07-09T11:21:43.367Z","0.4.0":"2026-07-09T13:03:26.966Z","0.4.1":"2026-07-29T07:48:23.901Z"},"bugs":{"url":"https://github.com/mrdulin/dm-proto-to-ts/issues"},"author":{"name":"Lin Du"},"license":"MIT","homepage":"https://github.com/mrdulin/dm-proto-to-ts#readme","keywords":["cli","proto","typescript"],"repository":{"type":"git","url":"git+https://github.com/mrdulin/dm-proto-to-ts.git"},"description":"Windows-only Node CLI for generating TypeScript from .proto files into a user-specified output directory.","maintainers":[{"name":"novaline","email":"novaline.dulin@gmail.com"}],"readme":"# proto-to-ts\n\n`@d-matrix/proto-to-ts` 是一个仅支持 Windows 的 Node CLI，用于将单个 `.proto` 文件生成到指定输出目录中的 TypeScript 文件。\n\n## 平台要求\n\n- Windows\n- Node.js 16.13 或更高版本\n\n## 使用方式\n\n推荐直接通过 `npx` 执行：\n\n```bash\nnpx @d-matrix/proto-to-ts ./proto/ping.proto ./output\n```\n\n如果已经全局安装，也可以直接调用二进制命令：\n\n```bash\nproto-to-ts ./proto/ping.proto ./output\n```\n\n如果是本地安装，推荐使用 `npx` 或 `npm exec`：\n\n```bash\nnpx @d-matrix/proto-to-ts ./proto/ping.proto ./output\nnpm exec proto-to-ts ./proto/ping.proto ./output\n```\n\n## 命令格式\n\n```bash\nproto-to-ts <proto-file> <output-dir>\n```\n\n参数说明：\n\n- `proto-file`：输入的 `.proto` 文件路径，支持相对路径和绝对路径\n- `output-dir`：生成后的 `.ts` 文件输出目录\n\n## CLI 选项\n\n查看帮助：\n\n```bash\nnpx @d-matrix/proto-to-ts --help\n```\n\n查看版本：\n\n```bash\nnpx @d-matrix/proto-to-ts --version\n```\n\n## 运行结果\n\n命令执行成功后，会输出：\n\n- 实际读取的 Proto 文件绝对路径\n- 实际输出目录绝对路径\n- 最终生成的 TypeScript 文件绝对路径\n\n生成规则：\n\n- 输入 `ping.proto`\n- 输出文件名固定为 `ping.ts`\n\n## 工作方式\n\n工具内部会：\n\n1. 校验输入的 `.proto` 文件路径\n2. 创建临时 Proto 输入目录和临时生成目录\n3. 调用包内置的 `protoc.exe` 和本地 `ts-proto`\n4. 将生成后的 `.ts` 文件复制到你指定的输出目录\n5. 清理临时目录\n\n## 常见错误\n\n### 当前版本仅支持 Windows 平台\n\n当前版本不会在 macOS 或 Linux 上运行。请在 Windows 环境中使用。\n\n### 参数数量不正确\n\n请确认命令格式为：\n\n```bash\nnpx @d-matrix/proto-to-ts <proto-file> <output-dir>\n```\n\n### 输入文件不是 `.proto`\n\n请确认第一个参数指向一个真实存在的 `.proto` 文件。\n\n### 找不到生成结果\n\n通常意味着 `protoc.exe` 执行失败，或 `.proto` 文件内容本身存在问题。请根据命令输出中的错误信息排查。\n\n## 本地开发\n\n```bash\nnpm install\nnpm run build\nnpm run typecheck\nnpm test\n```\n\n构建后可直接运行：\n\n```bash\nnode dist/index.js ./proto/ping.proto ./output\n```\n","readmeFilename":"README.md"}