@julong/mono-rele2-utils 1.0.1 → 1.1.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/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +11 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +9 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/text.d.ts +4 -0
- package/dist/tools/text.d.ts.map +1 -0
- package/dist/tools/text.js +59 -0
- package/dist/tools/text.js.map +1 -0
- package/package.json +18 -3
- package/src/index.ts +12 -1
- package/src/server.ts +10 -0
- package/src/tools/index.ts +1 -0
- package/src/tools/text.ts +62 -0
- package/tsconfig.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
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
|
+
|
|
1
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)
|
|
2
13
|
|
|
3
14
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { cn } from './cn.js';
|
|
2
|
+
export { cnTool, caseConvertTool, truncateTool } from './tools/index.js';
|
|
3
|
+
export declare function createUtilsServer(): import("@modelcontextprotocol/sdk/server/mcp").McpServer;
|
|
2
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAExE,wBAAgB,iBAAiB,6DAKhC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { createMcpServer } from '@julong/mono-rele2-common';
|
|
2
|
+
import { cnTool, caseConvertTool, truncateTool } from './tools/index.js';
|
|
3
|
+
export { cn } from './cn.js';
|
|
4
|
+
export { cnTool, caseConvertTool, truncateTool } from './tools/index.js';
|
|
5
|
+
export function createUtilsServer() {
|
|
6
|
+
return createMcpServer({ name: 'mono-rele2-utils', version: '1.0.0' }, [cnTool, caseConvertTool, truncateTool]);
|
|
7
|
+
}
|
|
2
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAExE,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAExE,MAAM,UAAU,iBAAiB;IAC/B,OAAO,eAAe,CACpB,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,EAC9C,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,CAAC,CACxC,CAAA;AACH,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":""}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { startServer } from '@julong/mono-rele2-common';
|
|
3
|
+
import { createUtilsServer } from './index.js';
|
|
4
|
+
const server = createUtilsServer();
|
|
5
|
+
startServer(server).catch((err) => {
|
|
6
|
+
console.error('[utils] server error:', err);
|
|
7
|
+
process.exit(1);
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9C,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAA;AAElC,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAChC,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAA;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const cnTool: import("@julong/mono-rele2-common").AnyToolDef;
|
|
2
|
+
export declare const caseConvertTool: import("@julong/mono-rele2-common").AnyToolDef;
|
|
3
|
+
export declare const truncateTool: import("@julong/mono-rele2-common").AnyToolDef;
|
|
4
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/tools/text.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,gDAOjB,CAAA;AAEF,eAAO,MAAM,eAAe,gDAa1B,CAAA;AAEF,eAAO,MAAM,YAAY,gDAYvB,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineTool, text } from '@julong/mono-rele2-common';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { cn } from '../cn.js';
|
|
4
|
+
export const cnTool = defineTool({
|
|
5
|
+
name: 'cn',
|
|
6
|
+
description: 'Merges class names, filtering out falsy values',
|
|
7
|
+
inputSchema: {
|
|
8
|
+
classes: z.array(z.string()).describe('List of class names to merge'),
|
|
9
|
+
},
|
|
10
|
+
handler: async ({ classes }) => text(cn(...classes)),
|
|
11
|
+
});
|
|
12
|
+
export const caseConvertTool = defineTool({
|
|
13
|
+
name: 'case_convert',
|
|
14
|
+
description: 'Converts text to the specified case format',
|
|
15
|
+
inputSchema: {
|
|
16
|
+
input: z.string().describe('Text to convert'),
|
|
17
|
+
to: z
|
|
18
|
+
.enum(['upper', 'lower', 'capitalize', 'camel', 'snake', 'kebab'])
|
|
19
|
+
.describe('Target case format'),
|
|
20
|
+
},
|
|
21
|
+
handler: async ({ input, to }) => {
|
|
22
|
+
const result = convert(input, to);
|
|
23
|
+
return text(result);
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
export const truncateTool = defineTool({
|
|
27
|
+
name: 'truncate',
|
|
28
|
+
description: 'Truncates text to a maximum length and appends a suffix',
|
|
29
|
+
inputSchema: {
|
|
30
|
+
input: z.string().describe('Text to truncate'),
|
|
31
|
+
maxLength: z.number().int().positive().describe('Maximum character length'),
|
|
32
|
+
suffix: z.string().default('...').describe('Suffix to append when truncated'),
|
|
33
|
+
},
|
|
34
|
+
handler: async ({ input, maxLength, suffix }) => {
|
|
35
|
+
const result = input.length <= maxLength ? input : input.slice(0, maxLength - suffix.length) + suffix;
|
|
36
|
+
return text(result);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
function convert(input, to) {
|
|
40
|
+
switch (to) {
|
|
41
|
+
case 'upper': return input.toUpperCase();
|
|
42
|
+
case 'lower': return input.toLowerCase();
|
|
43
|
+
case 'capitalize': return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
|
|
44
|
+
case 'camel': return input
|
|
45
|
+
.replace(/[-_\s]+(.)/g, (_, c) => c.toUpperCase())
|
|
46
|
+
.replace(/^(.)/, (c) => c.toLowerCase());
|
|
47
|
+
case 'snake': return input
|
|
48
|
+
.replace(/([A-Z])/g, '_$1')
|
|
49
|
+
.replace(/[-\s]+/g, '_')
|
|
50
|
+
.toLowerCase()
|
|
51
|
+
.replace(/^_/, '');
|
|
52
|
+
case 'kebab': return input
|
|
53
|
+
.replace(/([A-Z])/g, '-$1')
|
|
54
|
+
.replace(/[_\s]+/g, '-')
|
|
55
|
+
.toLowerCase()
|
|
56
|
+
.replace(/^-/, '');
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S,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;aACzD,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAA;QAC5C,KAAK,OAAO,CAAC,CAAC,OAAO,KAAK;aACrB,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;aAC1B,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;aACvB,WAAW,EAAE;aACb,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QACtB,KAAK,OAAO,CAAC,CAAC,OAAO,KAAK;aACrB,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;aAC1B,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;aACvB,WAAW,EAAE;aACb,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;IACxB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@julong/mono-rele2-utils",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -9,14 +9,29 @@
|
|
|
9
9
|
"types": "./src/index.ts"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
"bin": {
|
|
13
|
+
"mcp-utils": "./dist/server.js"
|
|
14
|
+
},
|
|
12
15
|
"publishConfig": {
|
|
13
|
-
"access": "public"
|
|
16
|
+
"access": "public",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
14
23
|
},
|
|
15
24
|
"scripts": {
|
|
16
|
-
"build": "tsc --build",
|
|
25
|
+
"build": "tsc --build && chmod 755 dist/server.js",
|
|
17
26
|
"typecheck": "tsc --noEmit",
|
|
18
27
|
"clean": "rimraf dist tsconfig.tsbuildinfo"
|
|
19
28
|
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@julong/mono-rele2-common": "1.0.0",
|
|
31
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
32
|
+
"@types/node": "^25.6.0",
|
|
33
|
+
"zod": "^3.24.0"
|
|
34
|
+
},
|
|
20
35
|
"devDependencies": {
|
|
21
36
|
"rimraf": "^6.0.1",
|
|
22
37
|
"typescript": "^5.6.3"
|
package/src/index.ts
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
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
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cnTool, caseConvertTool, truncateTool } from './text.js'
|
|
@@ -0,0 +1,62 @@
|
|
|
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.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/cn.ts","./src/index.ts"],"version":"5.9.3"}
|
|
1
|
+
{"root":["./src/cn.ts","./src/index.ts","./src/server.ts","./src/tools/index.ts","./src/tools/text.ts"],"version":"5.9.3"}
|