@clerc/plugin-strict-flags 1.0.0-beta.25 → 1.0.0-beta.27
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.
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ function joinWithAnd(values) {
|
|
|
13
13
|
const strictFlagsPlugin = () => definePlugin({ setup: (cli) => {
|
|
14
14
|
cli.interceptor(async (ctx, next) => {
|
|
15
15
|
const keys = Object.keys(ctx.rawParsed.unknown);
|
|
16
|
-
if (!ctx.
|
|
16
|
+
if (!ctx.command || keys.length === 0) await next();
|
|
17
17
|
else throw keys.length > 1 ? /* @__PURE__ */ new Error(`Unexpected flags: ${joinWithAnd(keys)}`) : /* @__PURE__ */ new Error(`Unexpected flag: ${keys[0]}`);
|
|
18
18
|
});
|
|
19
19
|
} });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerc/plugin-strict-flags",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.27",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Clerc plugin strict flags",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@clerc/
|
|
49
|
-
"@clerc/
|
|
48
|
+
"@clerc/core": "1.0.0-beta.27",
|
|
49
|
+
"@clerc/utils": "1.0.0-beta.27"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@clerc/core": "*"
|