@clerc/plugin-version
Advanced tools
Comparing version 0.28.1 to 0.29.0
@@ -1,1 +0,1 @@ | ||
import{definePlugin as g}from"@clerc/core";const v=e=>e.length===0?"":e.startsWith("v")?e:`v${e}`,c=({alias:e=["V"],command:n=!0}={})=>g({setup:s=>{const r=v(s._version);return n&&(s=s.command("version","Show version",{notes:['The version string begins with a "v".']}).on("version",()=>{process.stdout.write(r)})),s.inspector({enforce:"pre",fn:(t,i)=>{let o=!1;const a=["version",...e];for(const f of Object.keys(t.raw.mergedFlags))if(a.includes(f)){o=!0;break}o?process.stdout.write(r):i()}})}});export{c as versionPlugin}; | ||
import{definePlugin as d}from"@clerc/core";const f=e=>e.length===0?"":e.startsWith("v")?e:`v${e}`,m={en:{"version.commandDescription":"Show CLI version","version.notes.1":'The version string begins with a "v".'},"zh-CN":{"version.commandDescription":"\u5C55\u793A CLI \u7248\u672C","version.notes.1":'\u7248\u672C\u53F7\u5F00\u5934\u5E26\u6709 "v"\u3002'}},g=({alias:e=["V"],command:t=!0}={})=>d({setup:s=>{const{add:i,t:n}=s.i18n;i(m);const o=f(s._version);return t&&(s=s.command("version",n("version.commandDescription"),{notes:[n("version.notes.1")]}).on("version",()=>{process.stdout.write(o)})),s.inspector({enforce:"pre",fn:(u,c)=>{let r=!1;const v=["version",...e];for(const a of Object.keys(u.raw.mergedFlags))if(v.includes(a)){r=!0;break}r?process.stdout.write(o):c()}})}});export{g as versionPlugin}; |
{ | ||
"name": "@clerc/plugin-version", | ||
"version": "0.28.1", | ||
"version": "0.29.0", | ||
"author": "Ray <nn_201312@163.com> (https://github.com/so1ve)", | ||
@@ -46,4 +46,4 @@ "description": "Clerc plugin version", | ||
"devDependencies": { | ||
"@clerc/core": "0.28.1", | ||
"@clerc/utils": "0.28.1" | ||
"@clerc/core": "0.29.0", | ||
"@clerc/utils": "0.29.0" | ||
}, | ||
@@ -50,0 +50,0 @@ "scripts": { |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3332
11
0