From 5d257260f730f4254085a707189caecc9051b34f Mon Sep 17 00:00:00 2001 From: sinkcup Date: Mon, 7 Jun 2021 14:15:26 +0800 Subject: [PATCH] fix: #6 notice password --- README.md | 8 +++++--- lib/argv.js | 6 +++--- package.json | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1e3220b..c019dfe 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,13 @@ 用于推送 generic 类型制品到 coding 制品库 ## 安装 -``` + +```shell npm install coding-generic -g ``` ## 使用 -``` -coding-generic --username= --path= --registry= + +```shell +coding-generic --username=[:password] --path= --registry= ``` diff --git a/lib/argv.js b/lib/argv.js index 24fc112..cf58c38 100644 --- a/lib/argv.js +++ b/lib/argv.js @@ -1,9 +1,9 @@ const argv = require('yargs') - .usage('用法: coding-generic --username= --path= --registry=') + .usage('用法: coding-generic --username=[:PASSWORD] --path= --registry=') .options({ username: { alias: 'u', - describe: '用户名', + describe: '用户名(必填)和密码(可选),用冒号分隔', demandOption: true }, path: { @@ -26,7 +26,7 @@ const argv = require('yargs') .alias('version', 'v') .help('h') .alias('h', 'help') - .example('coding-generic --username=coding@coding.com --path=./test.txt --registry="https://codingcorp-generic.pkg.coding.net/project-name/generic-repo/chunks/test.txt?version=latest"') + .example('coding-generic --username=coding@coding.com:123456 --path=./test.txt --registry="https://codingcorp-generic.pkg.coding.net/project-name/generic-repo/chunks/test.txt?version=latest"') .argv; module.exports = argv; \ No newline at end of file diff --git a/package.json b/package.json index d61cc58..6e904e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coding-generic", - "version": "1.2.2", + "version": "1.2.3", "description": "", "main": "index.js", "bin": {