npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cicctencent/tars2node-cli

v0.0.2

Published

该项目fork by`@tencent/jce2node-cli` 提供了node环境的tars2node编译器,方便和框架进行工程化集成。

Readme

Tars2Node CLI

该项目fork by@tencent/jce2node-cli 提供了node环境的tars2node编译器,方便和框架进行工程化集成。

Install

npm i -D @jv/tars2node-cli

Usage

With CLI:

Command: tars [options] <entry-file>

Options:

-T --type       编译出的文件类型,默认为es5,可选项:ts | es5
-W --watch      监听指定文件或文件夹,支持模式匹配
-O --output     指定存放编译后文件的文件夹的路径
-M --mode       指定编译的目标服务类型,默认为all,可选项:client | service | all | web
-R --return     仅对生成service代码有效,service代码调用中添加ret参数
-G --gather     仅对生成service代码有效,service代码调用中的参数根据入参和出参聚合
-I --interface  仅对生成ts格式的service代码有效,service中附带含有servant所有的方法的interface
-E --entry (deprected) 入口文件路径
-L --long       long转译的类型,默认为string,可选项:string | number | bigint

Example: tars -T ts -W ./demo/**/*.tars -O ./dist -M web demo/interface.tar

tars -T ts -W ./_Proto/**/*.tars -O ./dist -M web

With Node:

const tars = require('tars2node-cli');
const ast = tars.ast('./foo/bar/your-tars-entry.tar');
/*
 * type与options中的type相同
 * mode与options中的mode相同,默认为'service'
 * config支持的选项:
 *  * withReturn: 与options中-R相同
 *  * gather: 与options中-G相同
 *  * interface: 与options中-I相同
 *  * long: 与options中-L相同
 *
 */
const runCompiler = tars.run('./foo/bar/your-tars-entry.tar', 'ts', './dist', 'client', { withReturn: true });

Featrue List

[x] 生成服务端代码 [x] Interface -> js [x] Enum -> js [x] Struct -> js [x] 生成typescript代码 [x] 生成客户端代码 [x] 添加默认值 [x] 添加const类型

TODO

P0

[ ] 生成d.ts代码

P1

[ ] 添加key类型

Author

@tencent/kealxiao

Contributors

  • @tencent/shanelv
  • @tencent/carvenzhang

License

MIT