Socket
Book a DemoInstallSign in
Socket

m-cli-utils

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-cli-utils

FE Cli 工具方法集 for m-fe-cli

0.1.6
latest
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

m-cli-utils

M-CLI 以及相关的插件需要用到的 utils 方法及常量

Getting Started

  • $ npm install m-cli-utils --save

API

consts 静态常量

namedesctypevalue
WORKSPACE当前的执行目录,即 process.cwd()string
CONFIG_PATH全局配置根目录 ~/.feconfigstring
PLUGIN_PATH全局插件根目录 ~/.feconfig/lib/node_modulesstring
USER_PROFILE用户信息配置文件 ~/.feconfig/profile.jsonstring
NPM_REGISTRY_URLnpm registry 地址string'https://registry.npmjs.org'

version 版本号相关方法

  • checkUpdate(registry: string, current: string): Promise<false | string> 检查是否需要更新,如果有新版本,则返回版本号

  • needUpdate(registry: string, current: string): Promise<boolean> 是否有新版本,以及是否需要升级(控制台二次确认)

userinfo 用户信息相关方法

  • getInfo(): Promise<UserConfig> 获取用户信息,如果没果,则会调用设置

  • setInfo(isUpdate = false) 设置用户信息, isUpdate 表示强制更新

Keywords

m-cli-utils

FAQs

Package last updated on 02 May 2022

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.