@julong/mono-rele2-utils 1.31.1 → 1.33.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.
- package/README.md +62 -29
- package/dist/chunk-CDRQCMN2.cjs +145 -0
- package/dist/chunk-JG5KC5FP.js +145 -0
- package/dist/cli.cjs +1 -6
- package/dist/cli.js +1 -6
- package/dist/index.cjs +1 -67
- package/dist/index.js +1 -67
- package/dist/server.cjs +1 -5
- package/dist/server.js +1 -5
- package/package.json +1 -1
- package/dist/skills/mono-rele2-utils-cli/skill.md +0 -170
package/README.md
CHANGED
|
@@ -50,6 +50,16 @@ Run without arguments to list all available tools:
|
|
|
50
50
|
mono-rele2-utils-cli
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
## Skill Installation
|
|
54
|
+
|
|
55
|
+
Install the CLI as a reusable skill for your AI agent:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
npx skills add https://github.com/jl917/mcp-kit/tree/main/packages/utils/skills
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
This registers all tools as callable skills in your agent's environment.
|
|
62
|
+
|
|
53
63
|
## Tools API Reference
|
|
54
64
|
|
|
55
65
|
### `cn(classes)`
|
|
@@ -57,27 +67,32 @@ mono-rele2-utils-cli
|
|
|
57
67
|
**Signature**
|
|
58
68
|
|
|
59
69
|
```typescript
|
|
60
|
-
function cn(classes: string[]): string
|
|
70
|
+
function cn(classes: string[]): string
|
|
61
71
|
```
|
|
62
72
|
|
|
63
73
|
Merges class names, filtering out falsy values.
|
|
64
74
|
|
|
75
|
+
|
|
65
76
|
**Parameters**
|
|
66
77
|
|
|
67
|
-
| Name
|
|
68
|
-
|
|
78
|
+
| Name | Type | Description |
|
|
79
|
+
|------|------|-------------|
|
|
69
80
|
| `classes` | `string[]` | List of class names to merge |
|
|
70
81
|
|
|
82
|
+
|
|
71
83
|
**Returns**
|
|
72
84
|
|
|
73
85
|
`string` — Merged class name string with falsy values filtered out
|
|
74
86
|
|
|
87
|
+
|
|
75
88
|
**CLI**
|
|
76
89
|
|
|
77
90
|
```sh
|
|
78
91
|
mono-rele2-utils-cli cnTool <classes>
|
|
79
92
|
```
|
|
80
93
|
|
|
94
|
+
|
|
95
|
+
|
|
81
96
|
**Examples**
|
|
82
97
|
|
|
83
98
|
```sh
|
|
@@ -90,43 +105,43 @@ mono-rele2-utils-cli cnTool '["btn","active","large"]'
|
|
|
90
105
|
**Signature**
|
|
91
106
|
|
|
92
107
|
```typescript
|
|
93
|
-
function case_convert(
|
|
94
|
-
input: string,
|
|
95
|
-
to: 'upper' | 'lower' | 'capitalize' | 'camel' | 'snake' | 'kebab',
|
|
96
|
-
): string;
|
|
108
|
+
function case_convert(input: string, to: "upper" | "lower" | "capitalize" | "camel" | "snake" | "kebab"): string
|
|
97
109
|
```
|
|
98
110
|
|
|
99
111
|
Converts text to the specified case format.
|
|
100
112
|
|
|
113
|
+
|
|
101
114
|
**Parameters**
|
|
102
115
|
|
|
103
|
-
| Name
|
|
104
|
-
|
|
116
|
+
| Name | Type | Description |
|
|
117
|
+
|------|------|-------------|
|
|
105
118
|
| `input` | `string` | Text to convert |
|
|
106
|
-
| `to`
|
|
119
|
+
| `to` | `"upper" | "lower" | "capitalize" | "camel" | "snake" | "kebab"` | Target case format |
|
|
120
|
+
|
|
107
121
|
|
|
108
122
|
**Returns**
|
|
109
123
|
|
|
110
124
|
`string` — Converted text in the target case format
|
|
111
125
|
|
|
126
|
+
|
|
112
127
|
**CLI**
|
|
113
128
|
|
|
114
129
|
```sh
|
|
115
130
|
mono-rele2-utils-cli caseConvertTool <input> <to>
|
|
116
131
|
```
|
|
117
132
|
|
|
133
|
+
|
|
134
|
+
|
|
118
135
|
**Examples**
|
|
119
136
|
|
|
120
137
|
```sh
|
|
121
138
|
mono-rele2-utils-cli caseConvertTool "hello world" camel
|
|
122
139
|
# → helloWorld
|
|
123
140
|
```
|
|
124
|
-
|
|
125
141
|
```sh
|
|
126
142
|
mono-rele2-utils-cli caseConvertTool "helloWorld" snake
|
|
127
143
|
# → hello_world
|
|
128
144
|
```
|
|
129
|
-
|
|
130
145
|
```sh
|
|
131
146
|
mono-rele2-utils-cli caseConvertTool "hello world" kebab
|
|
132
147
|
# → hello-world
|
|
@@ -137,36 +152,40 @@ mono-rele2-utils-cli caseConvertTool "hello world" kebab
|
|
|
137
152
|
**Signature**
|
|
138
153
|
|
|
139
154
|
```typescript
|
|
140
|
-
function truncate(input: string, maxLength: number, suffix?: string): string
|
|
155
|
+
function truncate(input: string, maxLength: number, suffix?: string): string
|
|
141
156
|
```
|
|
142
157
|
|
|
143
158
|
Truncates text to a maximum length and appends a suffix.
|
|
144
159
|
|
|
160
|
+
|
|
145
161
|
**Parameters**
|
|
146
162
|
|
|
147
|
-
| Name
|
|
148
|
-
|
|
149
|
-
| `input`
|
|
150
|
-
| `maxLength` | `number` | Maximum character length
|
|
151
|
-
| `suffix`
|
|
163
|
+
| Name | Type | Description |
|
|
164
|
+
|------|------|-------------|
|
|
165
|
+
| `input` | `string` | Text to truncate |
|
|
166
|
+
| `maxLength` | `number` | Maximum character length |
|
|
167
|
+
| `suffix` | `string` | Suffix to append when truncated (default: `...`) |
|
|
168
|
+
|
|
152
169
|
|
|
153
170
|
**Returns**
|
|
154
171
|
|
|
155
172
|
`string` — Truncated text with the configured suffix appended if truncated
|
|
156
173
|
|
|
174
|
+
|
|
157
175
|
**CLI**
|
|
158
176
|
|
|
159
177
|
```sh
|
|
160
178
|
mono-rele2-utils-cli truncateTool <input> <maxLength> [suffix]
|
|
161
179
|
```
|
|
162
180
|
|
|
181
|
+
|
|
182
|
+
|
|
163
183
|
**Examples**
|
|
164
184
|
|
|
165
185
|
```sh
|
|
166
186
|
mono-rele2-utils-cli truncateTool "hello world long text" 10
|
|
167
187
|
# → hello w...
|
|
168
188
|
```
|
|
169
|
-
|
|
170
189
|
```sh
|
|
171
190
|
mono-rele2-utils-cli truncateTool "hello world" 8 "…"
|
|
172
191
|
# → hello w…
|
|
@@ -182,22 +201,27 @@ function object_flatten(json: string \| JSON object): JsonObject
|
|
|
182
201
|
|
|
183
202
|
Flattens a nested JSON object of any depth into dot-notation key-value pairs. Accepts a JSON string and recursively flattens all levels. Arrays and primitives at any level are treated as leaf values..
|
|
184
203
|
|
|
204
|
+
|
|
185
205
|
**Parameters**
|
|
186
206
|
|
|
187
|
-
| Name
|
|
188
|
-
|
|
207
|
+
| Name | Type | Description |
|
|
208
|
+
|------|------|-------------|
|
|
189
209
|
| `json` | `string \| JSON object` | JSON string or parsed object to flatten (unlimited depth) |
|
|
190
210
|
|
|
211
|
+
|
|
191
212
|
**Returns**
|
|
192
213
|
|
|
193
214
|
`JsonObject` — Flattened object with dot-notation keys — e.g. { "a.b.c": value }
|
|
194
215
|
|
|
216
|
+
|
|
195
217
|
**CLI**
|
|
196
218
|
|
|
197
219
|
```sh
|
|
198
220
|
mono-rele2-utils-cli objectFlattenTool <json>
|
|
199
221
|
```
|
|
200
222
|
|
|
223
|
+
|
|
224
|
+
|
|
201
225
|
**Examples**
|
|
202
226
|
|
|
203
227
|
```sh
|
|
@@ -209,7 +233,6 @@ mono-rele2-utils-cli objectFlattenTool '{"user":{"name":"Alice","address":{"city
|
|
|
209
233
|
"active": true
|
|
210
234
|
}
|
|
211
235
|
```
|
|
212
|
-
|
|
213
236
|
```sh
|
|
214
237
|
mono-rele2-utils-cli objectFlattenTool '{"a":{"b":{"c":{"d":{"e":"deep"}}}}}'
|
|
215
238
|
# → {
|
|
@@ -222,32 +245,36 @@ mono-rele2-utils-cli objectFlattenTool '{"a":{"b":{"c":{"d":{"e":"deep"}}}}}'
|
|
|
222
245
|
**Signature**
|
|
223
246
|
|
|
224
247
|
```typescript
|
|
225
|
-
function getUser(user: RandomUser): string
|
|
248
|
+
function getUser(user: RandomUser): string
|
|
226
249
|
```
|
|
227
250
|
|
|
228
251
|
RandomUser API 형식의 사용자 객체를 받아 이름과 거주 도시로 구성된 한글 문장을 반환합니다. JSON 문자열 또는 파싱된 객체를 입력받습니다..
|
|
229
252
|
|
|
253
|
+
|
|
230
254
|
**Parameters**
|
|
231
255
|
|
|
232
|
-
| Name
|
|
233
|
-
|
|
256
|
+
| Name | Type | Description |
|
|
257
|
+
|------|------|-------------|
|
|
234
258
|
| `user` | `RandomUser` | RandomUser 형식의 JSON 문자열 또는 객체 — name.first / name.last / location.city 필수 |
|
|
235
259
|
|
|
260
|
+
|
|
236
261
|
**Returns**
|
|
237
262
|
|
|
238
263
|
`string` — "이름은 {first} {last} 이고 현재 {city} 에 살고 있습니다." 형식의 한글 문장
|
|
239
264
|
|
|
265
|
+
|
|
240
266
|
**CLI**
|
|
241
267
|
|
|
242
268
|
```sh
|
|
243
269
|
mono-rele2-utils-cli getUserTool <user>
|
|
244
270
|
```
|
|
245
271
|
|
|
272
|
+
|
|
246
273
|
**`user`** type definition
|
|
247
274
|
|
|
248
275
|
```typescript
|
|
249
276
|
interface RandomUser {
|
|
250
|
-
gender:
|
|
277
|
+
gender: "male" | "female";
|
|
251
278
|
name: {
|
|
252
279
|
title: string;
|
|
253
280
|
first: string;
|
|
@@ -291,6 +318,7 @@ interface RandomUser {
|
|
|
291
318
|
}
|
|
292
319
|
```
|
|
293
320
|
|
|
321
|
+
|
|
294
322
|
**Examples**
|
|
295
323
|
|
|
296
324
|
```sh
|
|
@@ -303,27 +331,31 @@ mono-rele2-utils-cli getUserTool '{"name":{"title":"Mr","first":"Alice","last":"
|
|
|
303
331
|
**Signature**
|
|
304
332
|
|
|
305
333
|
```typescript
|
|
306
|
-
function env_get(keys: string[]): Record<string, string
|
|
334
|
+
function env_get(keys: string[]): Record<string, string>
|
|
307
335
|
```
|
|
308
336
|
|
|
309
337
|
MCP 클라이언트 config의 env 필드를 통해 주입된 환경 변수 값을 조회합니다. 조회 가능한 키는 패키지에서 제공하는 환경 변수로 한정됩니다. 현재 지원: API_KEY..
|
|
310
338
|
|
|
339
|
+
|
|
311
340
|
**Parameters**
|
|
312
341
|
|
|
313
|
-
| Name
|
|
314
|
-
|
|
342
|
+
| Name | Type | Description |
|
|
343
|
+
|------|------|-------------|
|
|
315
344
|
| `keys` | `string[]` | 조회할 환경 변수 이름 목록 (유효 키: API_KEY) |
|
|
316
345
|
|
|
346
|
+
|
|
317
347
|
**Returns**
|
|
318
348
|
|
|
319
349
|
`Record<string, string>` — key: 환경 변수 이름, value: 해당 값 (설정되지 않은 변수는 결과에서 제외)
|
|
320
350
|
|
|
351
|
+
|
|
321
352
|
**CLI**
|
|
322
353
|
|
|
323
354
|
```sh
|
|
324
355
|
mono-rele2-utils-cli envGetTool <keys>
|
|
325
356
|
```
|
|
326
357
|
|
|
358
|
+
|
|
327
359
|
**`keys`** type definition
|
|
328
360
|
|
|
329
361
|
```typescript
|
|
@@ -344,6 +376,7 @@ mono-rele2-utils-cli envGetTool <keys>
|
|
|
344
376
|
// }
|
|
345
377
|
```
|
|
346
378
|
|
|
379
|
+
|
|
347
380
|
**Examples**
|
|
348
381
|
|
|
349
382
|
```sh
|