Socket
Socket
Sign inDemoInstall

hand-hls

Package Overview
Dependencies
8
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hand-hls

a simple command line tool to generate svc and bm files


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
165 kB
Created
Weekly downloads
 

Readme

Source

hand-hls

Installation:

npm install hand-hls -g

使用:

  • hls new [name]:在当前目录下生成svc,并在对应目录生成bm
  • hls sql [name] 根据当前目录svc名在控制台打印功能脚本
  • hls conf 根据配置文件生成对应的svc和bm

支持的命令:

hls new

hls new [name] -s [name]仅生成svc

hls new [name] -b [name...]仅生成bm,支持一个svc对应多个bm,此时bm名称应以逗号隔开

hls new [name] -l 生成适用于leaf的lsc

hls new [name] -f [field...]*[field...] 在生成svc和bm时注入需要的字段,字段之间以逗号隔开。生成多个bm时,每个bm对应的字段应以星号隔开,且字段列表数据必须与bm数目保持一致

注:以上命令选项可叠加使用
hls sql

hls sql [name] 生成功能脚本文件

hls conf

根据当前文件下的hls.conf.js生成对应的svc和bm

配置文件格式
module.exports={
    name:string,//svc的名称
    target:'leaf'|'aurora',//是否为leaf框架
    bms:[{
        name:string,//bm的名称
        params:Array<string>,//传递的参数
        fields:[{
            name:string,//字段名
            dataType:string,//数据库类型
            javaType:string,//java类型
            physicalName:string//字段在数据中的名称
        }]//字段列表,可为字符串或对象,为字符串时最终会被替换为对象,其name值与此字符串相等,其它为空
    }]//bm配置列表,数组中每个元素会生成对应的bm
}

Keywords

FAQs

Last updated on 23 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc