Skip to content

Commit

Permalink
Merge pull request #27 from beezen/dev
Browse files Browse the repository at this point in the history
feat: 新增NPM账号管理的_auth字段支持
  • Loading branch information
beezen authored Apr 10, 2024
2 parents 395816a + f07c095 commit 2d59aa9
Show file tree
Hide file tree
Showing 16 changed files with 321 additions and 251 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.11.0](https://github.com/beezen/nucm/compare/v1.10.1...v1.11.0) (2024-04-10)


### Features

* 新增NPM账号管理的_auth字段支持 ([95a02f6](https://github.com/beezen/nucm/commit/95a02f6adbdfc6f24f1ebaf4c98e110a779d535c))

### [1.10.1](https://github.com/beezen/nucm/compare/v1.10.0...v1.10.1) (2024-01-31)


Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ $ nucm use beezen

在后续的使用过程中,您可以通过 `nucm use <name>` 的方式快速切换各种账号的访问令牌,从而实现对 npm 包使用不同账号进行发布。

如果想进一步了解 NPM 登录相关的配置,可以参考[.npmrc 配置说明](https://docs.npmjs.com/cli/v9/configuring-npm/npmrc#auth-related-configuration)

## 许可证

MIT
Expand Down
2 changes: 2 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ Note: If you have logged in through npm login or npm adduser, you can preserve t

During subsequent use, you can swiftly switch between accounts using the nucm use <name> command, enabling quick switching of the associated Access Token. This allows seamless release of NPM packages with different account credentials.

If you want to learn more about the configuration of NPM login, you can refer to the [.npmrc configuration instructions](https://docs.npmjs.com/cli/v9/configuring-npm/npmrc#auth-related-configuration).

## LICENSE

MIT
Expand Down
184 changes: 94 additions & 90 deletions coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -1,85 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1706683266184" clover="3.2.0">
<project timestamp="1706683266184" name="All files">
<metrics statements="188" coveredstatements="170" conditionals="91" coveredconditionals="56" methods="25" coveredmethods="24" elements="304" coveredelements="250" complexity="0" loc="188" ncloc="188" packages="4" files="5" classes="5"/>
<coverage generated="1712751080157" clover="3.2.0">
<project timestamp="1712751080157" name="All files">
<metrics statements="192" coveredstatements="173" conditionals="96" coveredconditionals="59" methods="25" coveredmethods="24" elements="313" coveredelements="256" complexity="0" loc="192" ncloc="192" packages="4" files="5" classes="5"/>
<package name="actions">
<metrics statements="63" coveredstatements="58" conditionals="22" coveredconditionals="13" methods="8" coveredmethods="8"/>
<metrics statements="66" coveredstatements="60" conditionals="27" coveredconditionals="16" methods="8" coveredmethods="8"/>
<file name="base.ts" path="/Users/beezen/mine/github/nucm/src/actions/base.ts">
<metrics statements="63" coveredstatements="58" conditionals="22" coveredconditionals="13" methods="8" coveredmethods="8"/>
<metrics statements="66" coveredstatements="60" conditionals="27" coveredconditionals="16" methods="8" coveredmethods="8"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="1" type="stmt"/>
<line num="3" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="14" count="1" type="stmt"/>
<line num="15" count="2" type="stmt"/>
<line num="16" count="2" type="stmt"/>
<line num="17" count="2" type="stmt"/>
<line num="18" count="2" type="cond" truecount="0" falsecount="1"/>
<line num="19" count="6" type="stmt"/>
<line num="21" count="15" type="cond" truecount="1" falsecount="1"/>
<line num="24" count="15" type="cond" truecount="1" falsecount="0"/>
<line num="25" count="6" type="stmt"/>
<line num="27" count="9" type="stmt"/>
<line num="31" count="2" type="stmt"/>
<line num="32" count="2" type="stmt"/>
<line num="35" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="36" count="1" type="stmt"/>
<line num="37" count="1" type="stmt"/>
<line num="40" count="5" type="cond" truecount="2" falsecount="0"/>
<line num="44" count="5" type="stmt"/>
<line num="47" count="1" type="stmt"/>
<line num="49" count="1" type="stmt"/>
<line num="51" count="1" type="stmt"/>
<line num="52" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="54" count="2" type="stmt"/>
<line num="58" count="1" type="stmt"/>
<line num="19" count="1" type="stmt"/>
<line num="20" count="2" type="stmt"/>
<line num="21" count="2" type="stmt"/>
<line num="22" count="2" type="stmt"/>
<line num="23" count="2" type="cond" truecount="0" falsecount="1"/>
<line num="24" count="7" type="stmt"/>
<line num="26" count="12" type="cond" truecount="1" falsecount="1"/>
<line num="29" count="12" type="cond" truecount="1" falsecount="0"/>
<line num="30" count="7" type="stmt"/>
<line num="32" count="5" type="stmt"/>
<line num="36" count="2" type="stmt"/>
<line num="37" count="2" type="stmt"/>
<line num="40" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="41" count="1" type="stmt"/>
<line num="42" count="1" type="stmt"/>
<line num="45" count="6" type="cond" truecount="2" falsecount="0"/>
<line num="49" count="6" type="stmt"/>
<line num="52" count="1" type="stmt"/>
<line num="54" count="1" type="stmt"/>
<line num="56" count="1" type="stmt"/>
<line num="57" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="59" count="2" type="stmt"/>
<line num="60" count="2" type="stmt"/>
<line num="61" count="2" type="stmt"/>
<line num="62" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="63" count="2" type="cond" truecount="0" falsecount="1"/>
<line num="64" count="0" type="stmt"/>
<line num="65" count="0" type="stmt"/>
<line num="67" count="2" type="stmt"/>
<line num="69" count="2" type="stmt"/>
<line num="70" count="8" type="cond" truecount="1" falsecount="0"/>
<line num="71" count="1" type="stmt"/>
<line num="74" count="2" type="stmt"/>
<line num="75" count="2" type="stmt"/>
<line num="63" count="1" type="stmt"/>
<line num="64" count="2" type="stmt"/>
<line num="65" count="2" type="stmt"/>
<line num="66" count="2" type="stmt"/>
<line num="67" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="68" count="2" type="cond" truecount="0" falsecount="1"/>
<line num="69" count="0" type="stmt"/>
<line num="70" count="0" type="stmt"/>
<line num="72" count="2" type="stmt"/>
<line num="73" count="2" type="cond" truecount="3" falsecount="2"/>
<line num="74" count="0" type="stmt"/>
<line num="76" count="2" type="stmt"/>
<line num="77" count="2" type="stmt"/>
<line num="81" count="1" type="stmt"/>
<line num="82" count="2" type="stmt"/>
<line num="78" count="2" type="stmt"/>
<line num="79" count="4" type="cond" truecount="1" falsecount="0"/>
<line num="80" count="1" type="stmt"/>
<line num="83" count="2" type="stmt"/>
<line num="84" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="85" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="84" count="2" type="stmt"/>
<line num="85" count="2" type="stmt"/>
<line num="86" count="2" type="stmt"/>
<line num="87" count="2" type="stmt"/>
<line num="88" count="2" type="stmt"/>
<line num="89" count="2" type="stmt"/>
<line num="90" count="2" type="cond" truecount="0" falsecount="1"/>
<line num="92" count="0" type="stmt"/>
<line num="97" count="1" type="stmt"/>
<line num="90" count="1" type="stmt"/>
<line num="91" count="2" type="stmt"/>
<line num="92" count="2" type="stmt"/>
<line num="93" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="94" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="95" count="2" type="stmt"/>
<line num="96" count="2" type="stmt"/>
<line num="97" count="2" type="stmt"/>
<line num="98" count="2" type="stmt"/>
<line num="99" count="2" type="stmt"/>
<line num="100" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="101" count="2" type="cond" truecount="0" falsecount="1"/>
<line num="102" count="0" type="stmt"/>
<line num="103" count="0" type="stmt"/>
<line num="105" count="2" type="stmt"/>
<line num="106" count="2" type="stmt"/>
<line num="99" count="2" type="cond" truecount="0" falsecount="1"/>
<line num="101" count="0" type="stmt"/>
<line num="106" count="1" type="stmt"/>
<line num="107" count="2" type="stmt"/>
<line num="108" count="2" type="stmt"/>
<line num="109" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="110" count="2" type="cond" truecount="0" falsecount="1"/>
<line num="111" count="0" type="stmt"/>
<line num="112" count="0" type="stmt"/>
<line num="114" count="2" type="stmt"/>
<line num="115" count="2" type="stmt"/>
<line num="116" count="2" type="stmt"/>
</file>
</package>
<package name="common">
<metrics statements="73" coveredstatements="62" conditionals="50" coveredconditionals="26" methods="10" coveredmethods="9"/>
<metrics statements="74" coveredstatements="63" conditionals="50" coveredconditionals="26" methods="10" coveredmethods="9"/>
<file name="env.ts" path="/Users/beezen/mine/github/nucm/src/common/env.ts">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
<line num="1" count="2" type="stmt"/>
<line num="9" count="2" type="stmt"/>
</file>
<file name="index.ts" path="/Users/beezen/mine/github/nucm/src/common/index.ts">
<metrics statements="71" coveredstatements="60" conditionals="50" coveredconditionals="26" methods="10" coveredmethods="9"/>
<metrics statements="72" coveredstatements="61" conditionals="50" coveredconditionals="26" methods="10" coveredmethods="9"/>
<line num="1" count="2" type="stmt"/>
<line num="2" count="2" type="stmt"/>
<line num="3" count="2" type="stmt"/>
Expand Down Expand Up @@ -121,36 +124,37 @@
<line num="101" count="4" type="stmt"/>
<line num="102" count="4" type="stmt"/>
<line num="103" count="4" type="stmt"/>
<line num="105" count="4" type="stmt"/>
<line num="106" count="48" type="cond" truecount="6" falsecount="2"/>
<line num="107" count="48" type="cond" truecount="1" falsecount="0"/>
<line num="108" count="4" type="stmt"/>
<line num="111" count="4" type="stmt"/>
<line num="122" count="2" type="stmt"/>
<line num="123" count="3" type="cond" truecount="1" falsecount="0"/>
<line num="124" count="1" type="stmt"/>
<line num="125" count="1" type="stmt"/>
<line num="127" count="2" type="stmt"/>
<line num="134" count="2" type="stmt"/>
<line num="135" count="1" type="stmt"/>
<line num="136" count="1" type="stmt"/>
<line num="148" count="0" type="cond" truecount="0" falsecount="1"/>
<line num="149" count="0" type="stmt"/>
<line num="104" count="4" type="stmt"/>
<line num="106" count="4" type="stmt"/>
<line num="107" count="48" type="cond" truecount="6" falsecount="2"/>
<line num="108" count="48" type="cond" truecount="1" falsecount="0"/>
<line num="109" count="4" type="stmt"/>
<line num="112" count="4" type="stmt"/>
<line num="124" count="2" type="stmt"/>
<line num="125" count="3" type="cond" truecount="1" falsecount="0"/>
<line num="126" count="1" type="stmt"/>
<line num="127" count="1" type="stmt"/>
<line num="129" count="2" type="stmt"/>
<line num="136" count="2" type="stmt"/>
<line num="137" count="1" type="stmt"/>
<line num="138" count="1" type="stmt"/>
<line num="150" count="0" type="cond" truecount="0" falsecount="1"/>
<line num="151" count="0" type="stmt"/>
<line num="152" count="0" type="stmt"/>
<line num="152" count="0" type="cond" truecount="0" falsecount="1"/>
<line num="153" count="0" type="stmt"/>
<line num="154" count="0" type="stmt"/>
<line num="163" count="2" type="stmt"/>
<line num="164" count="1" type="stmt"/>
<line num="165" count="1" type="cond" truecount="0" falsecount="1"/>
<line num="156" count="0" type="stmt"/>
<line num="165" count="2" type="stmt"/>
<line num="166" count="1" type="stmt"/>
<line num="167" count="1" type="stmt"/>
<line num="168" count="1" type="cond" truecount="0" falsecount="1"/>
<line num="170" count="1" type="stmt"/>
<line num="175" count="1" type="stmt"/>
<line num="176" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="184" count="2" type="cond" truecount="1" falsecount="0"/>
<line num="185" count="2" type="stmt"/>
<line num="167" count="1" type="cond" truecount="0" falsecount="1"/>
<line num="168" count="1" type="stmt"/>
<line num="169" count="1" type="stmt"/>
<line num="170" count="1" type="cond" truecount="0" falsecount="1"/>
<line num="172" count="1" type="stmt"/>
<line num="177" count="1" type="stmt"/>
<line num="178" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="186" count="2" type="cond" truecount="1" falsecount="0"/>
<line num="187" count="2" type="stmt"/>
</file>
</package>
<package name="lang.default">
Expand All @@ -171,11 +175,11 @@
<line num="3" count="2" type="stmt"/>
<line num="5" count="2" type="stmt"/>
<line num="22" count="2" type="stmt"/>
<line num="23" count="18" type="stmt"/>
<line num="23" count="15" type="stmt"/>
<line num="31" count="2" type="stmt"/>
<line num="32" count="18" type="cond" truecount="1" falsecount="0"/>
<line num="33" count="17" type="cond" truecount="1" falsecount="0"/>
<line num="34" count="8" type="stmt"/>
<line num="32" count="15" type="cond" truecount="1" falsecount="0"/>
<line num="33" count="14" type="cond" truecount="1" falsecount="0"/>
<line num="34" count="9" type="stmt"/>
<line num="43" count="2" type="stmt"/>
<line num="44" count="7" type="cond" truecount="1" falsecount="1"/>
<line num="45" count="7" type="cond" truecount="1" falsecount="1"/>
Expand Down
Loading

0 comments on commit 2d59aa9

Please sign in to comment.