@twin.org/cli-core 0.0.3-next.3 → 0.0.3-next.30
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/README.md +2 -2
- package/docs/changelog.md +518 -1
- package/docs/examples.md +82 -1
- package/docs/reference/classes/CLIBase.md +3 -3
- package/docs/reference/classes/CLIDisplay.md +27 -27
- package/docs/reference/classes/CLIOptions.md +1 -1
- package/docs/reference/classes/CLIParam.md +56 -56
- package/docs/reference/classes/CLIUtils.md +17 -17
- package/docs/reference/interfaces/ICliOptions.md +12 -12
- package/docs/reference/interfaces/ICliOutputOptionsConsole.md +1 -1
- package/docs/reference/interfaces/ICliOutputOptionsEnv.md +3 -3
- package/docs/reference/interfaces/ICliOutputOptionsJson.md +3 -3
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TWIN CLI Core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package is part of the framework workspace and provides core classes for building a CLI to support consistent development workflows across the ecosystem.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ npm install @twin.org/cli-core
|
|
|
10
10
|
|
|
11
11
|
## Examples
|
|
12
12
|
|
|
13
|
-
Usage of the
|
|
13
|
+
Usage of the APIs is shown in the examples [docs/examples.md](docs/examples.md)
|
|
14
14
|
|
|
15
15
|
## Reference
|
|
16
16
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,4 +1,521 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.0.3-next.30](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.29...cli-core-v0.0.3-next.30) (2026-04-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **cli-core:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/core bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
16
|
+
* @twin.org/nameof bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
17
|
+
* devDependencies
|
|
18
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
19
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
20
|
+
|
|
21
|
+
## [0.0.3-next.29](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.28...cli-core-v0.0.3-next.29) (2026-04-14)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Miscellaneous Chores
|
|
25
|
+
|
|
26
|
+
* **cli-core:** Synchronize repo versions
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Dependencies
|
|
30
|
+
|
|
31
|
+
* The following workspace dependencies were updated
|
|
32
|
+
* dependencies
|
|
33
|
+
* @twin.org/core bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
34
|
+
* @twin.org/nameof bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
35
|
+
* devDependencies
|
|
36
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
37
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
38
|
+
|
|
39
|
+
## [0.0.3-next.28](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.27...cli-core-v0.0.3-next.28) (2026-03-27)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Miscellaneous Chores
|
|
43
|
+
|
|
44
|
+
* **cli-core:** Synchronize repo versions
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Dependencies
|
|
48
|
+
|
|
49
|
+
* The following workspace dependencies were updated
|
|
50
|
+
* dependencies
|
|
51
|
+
* @twin.org/core bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
52
|
+
* @twin.org/nameof bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
53
|
+
* devDependencies
|
|
54
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
55
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
56
|
+
|
|
57
|
+
## [0.0.3-next.27](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.26...cli-core-v0.0.3-next.27) (2026-03-27)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Miscellaneous Chores
|
|
61
|
+
|
|
62
|
+
* **cli-core:** Synchronize repo versions
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Dependencies
|
|
66
|
+
|
|
67
|
+
* The following workspace dependencies were updated
|
|
68
|
+
* dependencies
|
|
69
|
+
* @twin.org/core bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
70
|
+
* @twin.org/nameof bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
71
|
+
* devDependencies
|
|
72
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
73
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
74
|
+
|
|
75
|
+
## [0.0.3-next.26](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.25...cli-core-v0.0.3-next.26) (2026-03-24)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Miscellaneous Chores
|
|
79
|
+
|
|
80
|
+
* **cli-core:** Synchronize repo versions
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Dependencies
|
|
84
|
+
|
|
85
|
+
* The following workspace dependencies were updated
|
|
86
|
+
* dependencies
|
|
87
|
+
* @twin.org/core bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
88
|
+
* @twin.org/nameof bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
89
|
+
* devDependencies
|
|
90
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
91
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
92
|
+
|
|
93
|
+
## [0.0.3-next.25](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.24...cli-core-v0.0.3-next.25) (2026-03-23)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### Miscellaneous Chores
|
|
97
|
+
|
|
98
|
+
* **cli-core:** Synchronize repo versions
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Dependencies
|
|
102
|
+
|
|
103
|
+
* The following workspace dependencies were updated
|
|
104
|
+
* dependencies
|
|
105
|
+
* @twin.org/core bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
106
|
+
* @twin.org/nameof bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
107
|
+
* devDependencies
|
|
108
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
109
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
110
|
+
|
|
111
|
+
## [0.0.3-next.24](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.23...cli-core-v0.0.3-next.24) (2026-03-19)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### Bug Fixes
|
|
115
|
+
|
|
116
|
+
* ensure __decorate is defined for decorators ([103a563](https://github.com/twinfoundation/framework/commit/103a563ce01ebdef6240d2e590e7b026e8692684))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Dependencies
|
|
120
|
+
|
|
121
|
+
* The following workspace dependencies were updated
|
|
122
|
+
* dependencies
|
|
123
|
+
* @twin.org/core bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
124
|
+
* @twin.org/nameof bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
125
|
+
* devDependencies
|
|
126
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
127
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
128
|
+
|
|
129
|
+
## [0.0.3-next.23](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.22...cli-core-v0.0.3-next.23) (2026-03-17)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Miscellaneous Chores
|
|
133
|
+
|
|
134
|
+
* **cli-core:** Synchronize repo versions
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### Dependencies
|
|
138
|
+
|
|
139
|
+
* The following workspace dependencies were updated
|
|
140
|
+
* dependencies
|
|
141
|
+
* @twin.org/core bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
142
|
+
* @twin.org/nameof bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
143
|
+
* devDependencies
|
|
144
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
145
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
146
|
+
|
|
147
|
+
## [0.0.3-next.22](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.21...cli-core-v0.0.3-next.22) (2026-02-26)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
### Miscellaneous Chores
|
|
151
|
+
|
|
152
|
+
* **cli-core:** Synchronize repo versions
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### Dependencies
|
|
156
|
+
|
|
157
|
+
* The following workspace dependencies were updated
|
|
158
|
+
* dependencies
|
|
159
|
+
* @twin.org/core bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
160
|
+
* @twin.org/nameof bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
161
|
+
* devDependencies
|
|
162
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
163
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
164
|
+
|
|
165
|
+
## [0.0.3-next.21](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.20...cli-core-v0.0.3-next.21) (2026-02-26)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Features
|
|
169
|
+
|
|
170
|
+
* add CLIParam.arrayOneOf ([18f0815](https://github.com/twinfoundation/framework/commit/18f08157e5305cddf65d09b36a51a91a0873e396))
|
|
171
|
+
* add context id features ([#206](https://github.com/twinfoundation/framework/issues/206)) ([ef0d4ee](https://github.com/twinfoundation/framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
|
|
172
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
173
|
+
* eslint migration to flat config ([74427d7](https://github.com/twinfoundation/framework/commit/74427d78d342167f7850e49ab87269326355befe))
|
|
174
|
+
* improve error display in CLI ([94b6ca8](https://github.com/twinfoundation/framework/commit/94b6ca8bdcfe3ca7671c4095b436ea7bddaae98e))
|
|
175
|
+
* locales validation ([#197](https://github.com/twinfoundation/framework/issues/197)) ([55fdadb](https://github.com/twinfoundation/framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
|
|
176
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
177
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
178
|
+
* use cause instead of inner for errors ([1f4acc4](https://github.com/twinfoundation/framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
|
|
179
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### Bug Fixes
|
|
183
|
+
|
|
184
|
+
* cli display output for JSON to allow infinite depth ([2a06f52](https://github.com/twinfoundation/framework/commit/2a06f52c92dbc51a4969d651486a0c3548529929))
|
|
185
|
+
* export the json locales for cli-core ([188b47d](https://github.com/twinfoundation/framework/commit/188b47d3339deb42d08c32715909337749fb0e4a))
|
|
186
|
+
* framework pr naming convention ([#142](https://github.com/twinfoundation/framework/issues/142)) ([e29acee](https://github.com/twinfoundation/framework/commit/e29acee2fbec42506091956d6ba8b8ce25a90008))
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### Dependencies
|
|
190
|
+
|
|
191
|
+
* The following workspace dependencies were updated
|
|
192
|
+
* dependencies
|
|
193
|
+
* @twin.org/core bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
194
|
+
* @twin.org/nameof bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
195
|
+
* devDependencies
|
|
196
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
197
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
198
|
+
|
|
199
|
+
## [0.0.3-next.20](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.19...cli-core-v0.0.3-next.20) (2026-02-26)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### Miscellaneous Chores
|
|
203
|
+
|
|
204
|
+
* **cli-core:** Synchronize repo versions
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
### Dependencies
|
|
208
|
+
|
|
209
|
+
* The following workspace dependencies were updated
|
|
210
|
+
* dependencies
|
|
211
|
+
* @twin.org/core bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
212
|
+
* @twin.org/nameof bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
213
|
+
* devDependencies
|
|
214
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
215
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
216
|
+
|
|
217
|
+
## [0.0.3-next.19](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.18...cli-core-v0.0.3-next.19) (2026-02-26)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
### Miscellaneous Chores
|
|
221
|
+
|
|
222
|
+
* **cli-core:** Synchronize repo versions
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
### Dependencies
|
|
226
|
+
|
|
227
|
+
* The following workspace dependencies were updated
|
|
228
|
+
* dependencies
|
|
229
|
+
* @twin.org/core bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
230
|
+
* @twin.org/nameof bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
231
|
+
* devDependencies
|
|
232
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
233
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
234
|
+
|
|
235
|
+
## [0.0.3-next.18](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.17...cli-core-v0.0.3-next.18) (2026-02-23)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
### Bug Fixes
|
|
239
|
+
|
|
240
|
+
* export the json locales for cli-core ([188b47d](https://github.com/twinfoundation/framework/commit/188b47d3339deb42d08c32715909337749fb0e4a))
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
### Dependencies
|
|
244
|
+
|
|
245
|
+
* The following workspace dependencies were updated
|
|
246
|
+
* dependencies
|
|
247
|
+
* @twin.org/core bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
248
|
+
* @twin.org/nameof bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
249
|
+
* devDependencies
|
|
250
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
251
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
252
|
+
|
|
253
|
+
## [0.0.3-next.17](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.16...cli-core-v0.0.3-next.17) (2026-02-09)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
### Miscellaneous Chores
|
|
257
|
+
|
|
258
|
+
* **cli-core:** Synchronize repo versions
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### Dependencies
|
|
262
|
+
|
|
263
|
+
* The following workspace dependencies were updated
|
|
264
|
+
* dependencies
|
|
265
|
+
* @twin.org/core bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
266
|
+
* @twin.org/nameof bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
267
|
+
* devDependencies
|
|
268
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
269
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
270
|
+
|
|
271
|
+
## [0.0.3-next.16](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.15...cli-core-v0.0.3-next.16) (2026-02-06)
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
### Miscellaneous Chores
|
|
275
|
+
|
|
276
|
+
* **cli-core:** Synchronize repo versions
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
### Dependencies
|
|
280
|
+
|
|
281
|
+
* The following workspace dependencies were updated
|
|
282
|
+
* dependencies
|
|
283
|
+
* @twin.org/core bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
284
|
+
* @twin.org/nameof bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
285
|
+
* devDependencies
|
|
286
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
287
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
288
|
+
|
|
289
|
+
## [0.0.3-next.15](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.14...cli-core-v0.0.3-next.15) (2026-01-29)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
### Miscellaneous Chores
|
|
293
|
+
|
|
294
|
+
* **cli-core:** Synchronize repo versions
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
### Dependencies
|
|
298
|
+
|
|
299
|
+
* The following workspace dependencies were updated
|
|
300
|
+
* dependencies
|
|
301
|
+
* @twin.org/core bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
302
|
+
* @twin.org/nameof bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
303
|
+
* devDependencies
|
|
304
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
305
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
306
|
+
|
|
307
|
+
## [0.0.3-next.14](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.13...cli-core-v0.0.3-next.14) (2026-01-22)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
### Miscellaneous Chores
|
|
311
|
+
|
|
312
|
+
* **cli-core:** Synchronize repo versions
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
### Dependencies
|
|
316
|
+
|
|
317
|
+
* The following workspace dependencies were updated
|
|
318
|
+
* dependencies
|
|
319
|
+
* @twin.org/core bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
320
|
+
* @twin.org/nameof bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
321
|
+
* devDependencies
|
|
322
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
323
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
324
|
+
|
|
325
|
+
## [0.0.3-next.13](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.12...cli-core-v0.0.3-next.13) (2026-01-08)
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
### Miscellaneous Chores
|
|
329
|
+
|
|
330
|
+
* **cli-core:** Synchronize repo versions
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
### Dependencies
|
|
334
|
+
|
|
335
|
+
* The following workspace dependencies were updated
|
|
336
|
+
* dependencies
|
|
337
|
+
* @twin.org/core bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
338
|
+
* @twin.org/nameof bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
339
|
+
* devDependencies
|
|
340
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
341
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
342
|
+
|
|
343
|
+
## [0.0.3-next.12](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.11...cli-core-v0.0.3-next.12) (2026-01-08)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
### Miscellaneous Chores
|
|
347
|
+
|
|
348
|
+
* **cli-core:** Synchronize repo versions
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
### Dependencies
|
|
352
|
+
|
|
353
|
+
* The following workspace dependencies were updated
|
|
354
|
+
* dependencies
|
|
355
|
+
* @twin.org/core bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
356
|
+
* @twin.org/nameof bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
357
|
+
* devDependencies
|
|
358
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
359
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
360
|
+
|
|
361
|
+
## [0.0.3-next.11](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.10...cli-core-v0.0.3-next.11) (2026-01-07)
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
### Miscellaneous Chores
|
|
365
|
+
|
|
366
|
+
* **cli-core:** Synchronize repo versions
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
### Dependencies
|
|
370
|
+
|
|
371
|
+
* The following workspace dependencies were updated
|
|
372
|
+
* dependencies
|
|
373
|
+
* @twin.org/core bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
374
|
+
* @twin.org/nameof bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
375
|
+
* devDependencies
|
|
376
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
377
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
378
|
+
|
|
379
|
+
## [0.0.3-next.10](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.9...cli-core-v0.0.3-next.10) (2026-01-07)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
### Miscellaneous Chores
|
|
383
|
+
|
|
384
|
+
* **cli-core:** Synchronize repo versions
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
### Dependencies
|
|
388
|
+
|
|
389
|
+
* The following workspace dependencies were updated
|
|
390
|
+
* dependencies
|
|
391
|
+
* @twin.org/core bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
392
|
+
* @twin.org/nameof bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
393
|
+
* devDependencies
|
|
394
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
395
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
396
|
+
|
|
397
|
+
## [0.0.3-next.9](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.8...cli-core-v0.0.3-next.9) (2026-01-05)
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
### Miscellaneous Chores
|
|
401
|
+
|
|
402
|
+
* **cli-core:** Synchronize repo versions
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
### Dependencies
|
|
406
|
+
|
|
407
|
+
* The following workspace dependencies were updated
|
|
408
|
+
* dependencies
|
|
409
|
+
* @twin.org/core bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
410
|
+
* @twin.org/nameof bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
411
|
+
* devDependencies
|
|
412
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
413
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
414
|
+
|
|
415
|
+
## [0.0.3-next.8](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.7...cli-core-v0.0.3-next.8) (2025-11-26)
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
### Miscellaneous Chores
|
|
419
|
+
|
|
420
|
+
* **cli-core:** Synchronize repo versions
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
### Dependencies
|
|
424
|
+
|
|
425
|
+
* The following workspace dependencies were updated
|
|
426
|
+
* dependencies
|
|
427
|
+
* @twin.org/core bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
428
|
+
* @twin.org/nameof bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
429
|
+
* devDependencies
|
|
430
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
431
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
432
|
+
|
|
433
|
+
## [0.0.3-next.7](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.6...cli-core-v0.0.3-next.7) (2025-11-25)
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
### Features
|
|
437
|
+
|
|
438
|
+
* add CLIParam.arrayOneOf ([18f0815](https://github.com/twinfoundation/framework/commit/18f08157e5305cddf65d09b36a51a91a0873e396))
|
|
439
|
+
* add context id features ([#206](https://github.com/twinfoundation/framework/issues/206)) ([ef0d4ee](https://github.com/twinfoundation/framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
|
|
440
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
441
|
+
* eslint migration to flat config ([74427d7](https://github.com/twinfoundation/framework/commit/74427d78d342167f7850e49ab87269326355befe))
|
|
442
|
+
* improve error display in CLI ([94b6ca8](https://github.com/twinfoundation/framework/commit/94b6ca8bdcfe3ca7671c4095b436ea7bddaae98e))
|
|
443
|
+
* locales validation ([#197](https://github.com/twinfoundation/framework/issues/197)) ([55fdadb](https://github.com/twinfoundation/framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
|
|
444
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
445
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
446
|
+
* use cause instead of inner for errors ([1f4acc4](https://github.com/twinfoundation/framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
|
|
447
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
### Bug Fixes
|
|
451
|
+
|
|
452
|
+
* cli display output for JSON to allow infinite depth ([2a06f52](https://github.com/twinfoundation/framework/commit/2a06f52c92dbc51a4969d651486a0c3548529929))
|
|
453
|
+
* framework pr naming convention ([#142](https://github.com/twinfoundation/framework/issues/142)) ([e29acee](https://github.com/twinfoundation/framework/commit/e29acee2fbec42506091956d6ba8b8ce25a90008))
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
### Dependencies
|
|
457
|
+
|
|
458
|
+
* The following workspace dependencies were updated
|
|
459
|
+
* dependencies
|
|
460
|
+
* @twin.org/core bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
461
|
+
* @twin.org/nameof bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
462
|
+
* devDependencies
|
|
463
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
464
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
465
|
+
|
|
466
|
+
## [0.0.3-next.6](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.5...cli-core-v0.0.3-next.6) (2025-11-25)
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
### Miscellaneous Chores
|
|
470
|
+
|
|
471
|
+
* **cli-core:** Synchronize repo versions
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
### Dependencies
|
|
475
|
+
|
|
476
|
+
* The following workspace dependencies were updated
|
|
477
|
+
* dependencies
|
|
478
|
+
* @twin.org/core bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
479
|
+
* @twin.org/nameof bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
480
|
+
* devDependencies
|
|
481
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
482
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
483
|
+
|
|
484
|
+
## [0.0.3-next.5](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.4...cli-core-v0.0.3-next.5) (2025-11-20)
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
### Miscellaneous Chores
|
|
488
|
+
|
|
489
|
+
* **cli-core:** Synchronize repo versions
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
### Dependencies
|
|
493
|
+
|
|
494
|
+
* The following workspace dependencies were updated
|
|
495
|
+
* dependencies
|
|
496
|
+
* @twin.org/core bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
497
|
+
* @twin.org/nameof bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
498
|
+
* devDependencies
|
|
499
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
500
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
501
|
+
|
|
502
|
+
## [0.0.3-next.4](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.3...cli-core-v0.0.3-next.4) (2025-11-13)
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
### Miscellaneous Chores
|
|
506
|
+
|
|
507
|
+
* **cli-core:** Synchronize repo versions
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
### Dependencies
|
|
511
|
+
|
|
512
|
+
* The following workspace dependencies were updated
|
|
513
|
+
* dependencies
|
|
514
|
+
* @twin.org/core bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
515
|
+
* @twin.org/nameof bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
516
|
+
* devDependencies
|
|
517
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
518
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
2
519
|
|
|
3
520
|
## [0.0.3-next.3](https://github.com/twinfoundation/framework/compare/cli-core-v0.0.3-next.2...cli-core-v0.0.3-next.3) (2025-11-12)
|
|
4
521
|
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,82 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CLI Core Examples
|
|
2
|
+
|
|
3
|
+
Use these snippets to compose clear command line workflows with consistent output, argument parsing and file handling.
|
|
4
|
+
|
|
5
|
+
## CLIDisplay
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { CLIDisplay } from '@twin.org/cli-core';
|
|
9
|
+
|
|
10
|
+
CLIDisplay.header('Data Import', '1.2.0');
|
|
11
|
+
CLIDisplay.section('Validation');
|
|
12
|
+
CLIDisplay.value('Records', 128);
|
|
13
|
+
CLIDisplay.warning('2 rows have missing optional fields');
|
|
14
|
+
CLIDisplay.done();
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## CLIParam
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { CLIParam } from '@twin.org/cli-core';
|
|
21
|
+
|
|
22
|
+
const parsedCount = CLIParam.integer('count', '25');
|
|
23
|
+
const parsedDebug = CLIParam.boolean('debug', 'true');
|
|
24
|
+
const parsedUrl = CLIParam.url('endpoint', 'https://api.example.org');
|
|
25
|
+
|
|
26
|
+
console.log(parsedCount + 1); // 26
|
|
27
|
+
console.log(parsedDebug); // true
|
|
28
|
+
console.log(parsedUrl.host); // api.example.org
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## CLIBase
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { CLIBase } from '@twin.org/cli-core';
|
|
35
|
+
import type { Command } from 'commander';
|
|
36
|
+
|
|
37
|
+
class ToolCli extends CLIBase {
|
|
38
|
+
protected getCommands(program: Command): Command[] {
|
|
39
|
+
return [program.command('status').action(() => {})];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const cli = new ToolCli();
|
|
44
|
+
const exitCode = await cli.execute(
|
|
45
|
+
{
|
|
46
|
+
appName: 'tool-cli',
|
|
47
|
+
title: 'Tool CLI',
|
|
48
|
+
version: '1.0.0'
|
|
49
|
+
},
|
|
50
|
+
'./locales',
|
|
51
|
+
['node', 'tool-cli', 'status']
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
console.log(exitCode); // 0
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## CLIUtils
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import { CLIUtils } from '@twin.org/cli-core';
|
|
61
|
+
|
|
62
|
+
console.log(await CLIUtils.fileExists('./config/import.json')); // true
|
|
63
|
+
const config = await CLIUtils.readJsonFile<{ source: string }>('./config/import.json');
|
|
64
|
+
await CLIUtils.writeEnvFile('./dist/import.env', {
|
|
65
|
+
SOURCE: config.source
|
|
66
|
+
});
|
|
67
|
+
console.log(config.source); // ./data/source.json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## CLIOptions
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import { CLIOptions } from '@twin.org/cli-core';
|
|
74
|
+
|
|
75
|
+
const options = new CLIOptions();
|
|
76
|
+
|
|
77
|
+
options.output({
|
|
78
|
+
json: './dist/output.json'
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
console.log(options.toObject().json); // ./dist/output.json
|
|
82
|
+
```
|
|
@@ -14,7 +14,7 @@ The main entry point for the CLI.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### execute()
|
|
17
|
+
### execute() {#execute}
|
|
18
18
|
|
|
19
19
|
> **execute**(`options`, `localesDirectory`, `argv`): `Promise`\<`number`\>
|
|
20
20
|
|
|
@@ -48,7 +48,7 @@ The exit code.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
### configureRoot()
|
|
51
|
+
### configureRoot() {#configureroot}
|
|
52
52
|
|
|
53
53
|
> `protected` **configureRoot**(`program`): `void`
|
|
54
54
|
|
|
@@ -68,7 +68,7 @@ The root program command.
|
|
|
68
68
|
|
|
69
69
|
***
|
|
70
70
|
|
|
71
|
-
### getCommands()
|
|
71
|
+
### getCommands() {#getcommands}
|
|
72
72
|
|
|
73
73
|
> `protected` **getCommands**(`program`): `Command`[]
|
|
74
74
|
|