@clerc/plugin-strict-flags 0.28.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{definePlugin as l}from"@clerc/core";const o=n=>n.length<=1?n[0]:`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`,r=()=>l({setup:n=>n.inspector((t,s)=>{const e=Object.keys(t.unknownFlags);if(!t.resolved||e.length===0)s();else throw new Error(`Unexpected flag${e.length>1?"s":""}: ${o(e)}`)})});export{r as strictFlagsPlugin};
1
+ import{definePlugin as i}from"@clerc/core";const a={en:{"utils.and":"%s and %s"},"zh-CN":{"utils.and":"%s \u548C %s"}},l=(e,{add:n,t:s})=>(n(a),e.length<=1?e[0]:s("utils.and",e.slice(0,-1).join(", "),e[e.length-1])),c={en:{"strictFlags.unexpectedSingle":"Unexpected flag: %s.","strictFlags.unexpectedMore":"Unexpected flags: %s.","strictFlags.and":"%s and %s"},"zh-CN":{"strictFlags.unexpectedSingle":"\u9884\u671F\u4E4B\u5916\u7684\u6807\u5FD7: %s\u3002","strictFlags.unexpectedMore":"\u9884\u671F\u4E4B\u5916\u7684\u6807\u5FD7: %s\u3002","strictFlags.and":"%s \u548C %s"}},d=()=>i({setup:e=>{const{add:n,t:s}=e.i18n;return n(c),e.inspector((u,r)=>{const t=Object.keys(u.unknownFlags);if(!u.resolved||t.length===0)r();else throw t.length>1?new Error(s("strictFlags.unexpectedMore",l(t,e.i18n))):new Error(s("strictFlags.unexpectedSingle",l(t,e.i18n)))})}});export{d as strictFlagsPlugin};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerc/plugin-strict-flags",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "author": "Ray <nn_201312@163.com> (https://github.com/so1ve)",
5
5
  "description": "Clerc plugin strict flags",
6
6
  "keywords": [
@@ -51,8 +51,8 @@
51
51
  "@clerc/core": "*"
52
52
  },
53
53
  "devDependencies": {
54
- "@clerc/core": "0.28.0",
55
- "@clerc/utils": "0.28.0"
54
+ "@clerc/core": "0.29.0",
55
+ "@clerc/utils": "0.29.0"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "puild --minify",