@julong/mono-rele2-utils 1.1.0 → 1.1.2
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 +8 -11
- package/.turbo/turbo-build.log +0 -4
- package/CHANGELOG.md +0 -22
- package/src/cn.ts +0 -4
- package/src/index.ts +0 -12
- package/src/server.ts +0 -10
- package/src/tools/index.ts +0 -1
- package/src/tools/text.ts +0 -62
- package/tsconfig.json +0 -19
- package/tsconfig.tsbuildinfo +0 -1
package/package.json
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@julong/mono-rele2-utils",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
-
"import": "./
|
|
9
|
-
"types": "./
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"bin": {
|
|
13
13
|
"mcp-utils": "./dist/server.js"
|
|
14
14
|
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
15
18
|
"publishConfig": {
|
|
16
|
-
"access": "public"
|
|
17
|
-
"exports": {
|
|
18
|
-
".": {
|
|
19
|
-
"import": "./dist/index.js",
|
|
20
|
-
"types": "./dist/index.d.ts"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
19
|
+
"access": "public"
|
|
23
20
|
},
|
|
24
21
|
"scripts": {
|
|
25
22
|
"build": "tsc --build && chmod 755 dist/server.js",
|
|
@@ -27,7 +24,7 @@
|
|
|
27
24
|
"clean": "rimraf dist tsconfig.tsbuildinfo"
|
|
28
25
|
},
|
|
29
26
|
"dependencies": {
|
|
30
|
-
"@julong/mono-rele2-common": "1.
|
|
27
|
+
"@julong/mono-rele2-common": "1.1.1",
|
|
31
28
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
32
29
|
"@types/node": "^25.6.0",
|
|
33
30
|
"zod": "^3.24.0"
|
package/.turbo/turbo-build.log
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
## @julong/mono-rele2-utils [1.1.0](https://github.com/mss-julong/mono-rele2/compare/@julong/mono-rele2-utils@1.0.1...@julong/mono-rele2-utils@1.1.0) (2026-04-30)
|
|
2
|
-
|
|
3
|
-
### Features
|
|
4
|
-
|
|
5
|
-
* mcp서버 추가 ([2d00087](https://github.com/mss-julong/mono-rele2/commit/2d0008777d5a0b3b032d93ef7e18c9ea13e0d619))
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Dependencies
|
|
9
|
-
|
|
10
|
-
* **@julong/mono-rele2-common:** upgraded to 1.0.0
|
|
11
|
-
|
|
12
|
-
## @julong/mono-rele2-utils [1.0.1](https://github.com/mss-julong/mono-rele2/compare/@julong/mono-rele2-utils@1.0.0...@julong/mono-rele2-utils@1.0.1) (2026-04-30)
|
|
13
|
-
|
|
14
|
-
### Bug Fixes
|
|
15
|
-
|
|
16
|
-
* 오류 수정 ([a420e11](https://github.com/mss-julong/mono-rele2/commit/a420e11fe5874980c85b2a0d404162af8336423e))
|
|
17
|
-
|
|
18
|
-
## @julong/mono-rele2-utils 1.0.0 (2026-04-30)
|
|
19
|
-
|
|
20
|
-
### Features
|
|
21
|
-
|
|
22
|
-
* 프로젝트 초기화 ([4786372](https://github.com/mss-julong/mono-rele2/commit/47863729484561d11757409bde78dd63baad8c8c))
|
package/src/cn.ts
DELETED
package/src/index.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createMcpServer } from '@julong/mono-rele2-common'
|
|
2
|
-
import { cnTool, caseConvertTool, truncateTool } from './tools/index.js'
|
|
3
|
-
|
|
4
|
-
export { cn } from './cn.js'
|
|
5
|
-
export { cnTool, caseConvertTool, truncateTool } from './tools/index.js'
|
|
6
|
-
|
|
7
|
-
export function createUtilsServer() {
|
|
8
|
-
return createMcpServer(
|
|
9
|
-
{ name: 'mono-rele2-utils', version: '1.0.0' },
|
|
10
|
-
[cnTool, caseConvertTool, truncateTool],
|
|
11
|
-
)
|
|
12
|
-
}
|
package/src/server.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { startServer } from '@julong/mono-rele2-common'
|
|
3
|
-
import { createUtilsServer } from './index.js'
|
|
4
|
-
|
|
5
|
-
const server = createUtilsServer()
|
|
6
|
-
|
|
7
|
-
startServer(server).catch((err) => {
|
|
8
|
-
console.error('[utils] server error:', err)
|
|
9
|
-
process.exit(1)
|
|
10
|
-
})
|
package/src/tools/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { cnTool, caseConvertTool, truncateTool } from './text.js'
|
package/src/tools/text.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { defineTool, text } from '@julong/mono-rele2-common'
|
|
2
|
-
import { z } from 'zod'
|
|
3
|
-
import { cn } from '../cn.js'
|
|
4
|
-
|
|
5
|
-
export const cnTool = defineTool({
|
|
6
|
-
name: 'cn',
|
|
7
|
-
description: 'Merges class names, filtering out falsy values',
|
|
8
|
-
inputSchema: {
|
|
9
|
-
classes: z.array(z.string()).describe('List of class names to merge'),
|
|
10
|
-
},
|
|
11
|
-
handler: async ({ classes }) => text(cn(...classes)),
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
export const caseConvertTool = defineTool({
|
|
15
|
-
name: 'case_convert',
|
|
16
|
-
description: 'Converts text to the specified case format',
|
|
17
|
-
inputSchema: {
|
|
18
|
-
input: z.string().describe('Text to convert'),
|
|
19
|
-
to: z
|
|
20
|
-
.enum(['upper', 'lower', 'capitalize', 'camel', 'snake', 'kebab'])
|
|
21
|
-
.describe('Target case format'),
|
|
22
|
-
},
|
|
23
|
-
handler: async ({ input, to }) => {
|
|
24
|
-
const result = convert(input, to)
|
|
25
|
-
return text(result)
|
|
26
|
-
},
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
export const truncateTool = defineTool({
|
|
30
|
-
name: 'truncate',
|
|
31
|
-
description: 'Truncates text to a maximum length and appends a suffix',
|
|
32
|
-
inputSchema: {
|
|
33
|
-
input: z.string().describe('Text to truncate'),
|
|
34
|
-
maxLength: z.number().int().positive().describe('Maximum character length'),
|
|
35
|
-
suffix: z.string().default('...').describe('Suffix to append when truncated'),
|
|
36
|
-
},
|
|
37
|
-
handler: async ({ input, maxLength, suffix }) => {
|
|
38
|
-
const result = input.length <= maxLength ? input : input.slice(0, maxLength - suffix.length) + suffix
|
|
39
|
-
return text(result)
|
|
40
|
-
},
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
function convert(input: string, to: 'upper' | 'lower' | 'capitalize' | 'camel' | 'snake' | 'kebab'): string {
|
|
44
|
-
switch (to) {
|
|
45
|
-
case 'upper': return input.toUpperCase()
|
|
46
|
-
case 'lower': return input.toLowerCase()
|
|
47
|
-
case 'capitalize': return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase()
|
|
48
|
-
case 'camel': return input
|
|
49
|
-
.replace(/[-_\s]+(.)/g, (_, c: string) => c.toUpperCase())
|
|
50
|
-
.replace(/^(.)/, (c) => c.toLowerCase())
|
|
51
|
-
case 'snake': return input
|
|
52
|
-
.replace(/([A-Z])/g, '_$1')
|
|
53
|
-
.replace(/[-\s]+/g, '_')
|
|
54
|
-
.toLowerCase()
|
|
55
|
-
.replace(/^_/, '')
|
|
56
|
-
case 'kebab': return input
|
|
57
|
-
.replace(/([A-Z])/g, '-$1')
|
|
58
|
-
.replace(/[_\s]+/g, '-')
|
|
59
|
-
.toLowerCase()
|
|
60
|
-
.replace(/^-/, '')
|
|
61
|
-
}
|
|
62
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ES2022",
|
|
5
|
-
"lib": ["ES2022"],
|
|
6
|
-
"module": "NodeNext",
|
|
7
|
-
"moduleResolution": "NodeNext",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"resolveJsonModule": true,
|
|
12
|
-
"declaration": true,
|
|
13
|
-
"declarationMap": true,
|
|
14
|
-
"sourceMap": true,
|
|
15
|
-
"outDir": "dist",
|
|
16
|
-
"rootDir": "src"
|
|
17
|
-
},
|
|
18
|
-
"include": ["src"]
|
|
19
|
-
}
|
package/tsconfig.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./src/cn.ts","./src/index.ts","./src/server.ts","./src/tools/index.ts","./src/tools/text.ts"],"version":"5.9.3"}
|