@travetto/cli 2.0.3 → 2.1.1
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/package.json +3 -3
- package/src/plugin-base.ts +10 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/cli",
|
|
3
3
|
"displayName": "Command Line Interface",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.1.1",
|
|
5
5
|
"description": "CLI infrastructure for travetto framework",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"cli",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"directory": "module/cli"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@travetto/base": "^2.
|
|
31
|
-
"commander": "^
|
|
30
|
+
"@travetto/base": "^2.1.1",
|
|
31
|
+
"commander": "^9.0.0"
|
|
32
32
|
},
|
|
33
33
|
"docDependencies": {
|
|
34
34
|
"@travetto/app": true
|
package/src/plugin-base.ts
CHANGED
|
@@ -136,10 +136,20 @@ export abstract class BasePlugin<V extends ParamMap = ParamMap> {
|
|
|
136
136
|
.BuildUtil.build();
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Expose configuration as constrained typed object
|
|
141
|
+
*/
|
|
139
142
|
get cmd() {
|
|
140
143
|
return this.#cmd.opts() as Shape<ReturnType<Exclude<this['getOptions'], undefined>>>;
|
|
141
144
|
}
|
|
142
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Expose command line arguments
|
|
148
|
+
*/
|
|
149
|
+
get args() {
|
|
150
|
+
return this.#cmd.args;
|
|
151
|
+
}
|
|
152
|
+
|
|
143
153
|
/**
|
|
144
154
|
* Render help with additional message or extra text
|
|
145
155
|
*/
|