Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cloudbase/addon-cli

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudbase/addon-cli

微搭插件的命令行基础库

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

@cloudbase/addon-cli

@cloudbase/clitcb addon 命令行的功能实现

发布

请前往流水线发布

开发

  • 方式一:单元测试开发

    需要自行提供相关 mock 数据。具体请参考 test/fixtures 的相关代码

    $ yarn test [path/to/testFile]
    

    举例:通过单元测试开发调试 pull 命令

    $ yarn test test/tests/pull.test.ts
    
  • 方式二:使用 tcb 开发调试

    1. 将 addon-cli 链接到本地模块并开启修改监听
    $ yarn run link
    $ yarn run dev
    
    1. 将 tcb 链接到本地并开启修改监听(可选,适用于运行本地 cloud-base-cli 的情况)
    $ cd path/to/cloud-base-cli
    $ npm link
    $ yarn run dev
    
    1. 运行 tcb addon <command> 命令
    tcb addon <command>
    

    示例 1:运行 pull 命令

    pull 插件

    $ tcb addon pull wx_custom --envId lowcode-1gk9y5ik310a94df
    

    pull 资源

    $ tcb addon pull block1 --resource block --envId lowcode-1gk9y5ik310a94df
    

    示例 2:运行 push 命令

    push 插件

    $ tcb addon push
    

    push 资源

    $ tcb addon push --resource block
    

代码生成

需要提前安装 ncgen: npm i ncgen -g

  • 新增一个命令

比如 pull, push 这种命令

$ yarn code:add-command
  • 为命令新增一种资源处理

比如为 pull 命令增加 block 资源处理

$ yarn code:add-resource

FAQs

Package last updated on 04 Jul 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc