@julong/mono-rele2-utils 1.4.0 → 1.6.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 CHANGED
@@ -97,5 +97,5 @@ mono-rele2-utils truncateTool "hello world" 8 "…" # hello w…
97
97
  ## MCP Server
98
98
 
99
99
  ```sh
100
- mcp-utils
100
+ npx -y @julong/mono-rele2-utils
101
101
  ```
package/dist/index.js CHANGED
@@ -13,16 +13,20 @@ function text(content) {
13
13
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
14
14
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
15
15
  function createMcpServer(config, tools2) {
16
- const server = new McpServer(config);
16
+ const server2 = new McpServer(config);
17
17
  for (const tool of tools2) {
18
- server.registerTool(
18
+ server2.registerTool(
19
19
  tool.name,
20
20
  { description: tool.description, inputSchema: tool.inputSchema },
21
21
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
22
  tool.handler
23
23
  );
24
24
  }
25
- return server;
25
+ return server2;
26
+ }
27
+ async function startServer(server2) {
28
+ const transport = new StdioServerTransport();
29
+ await server2.connect(transport);
26
30
  }
27
31
 
28
32
  // ../common/kit/cli.ts
@@ -97,7 +101,7 @@ function renderExamples(binName, tools2) {
97
101
  if (!tool.examples) continue;
98
102
  for (const ex of tool.examples) {
99
103
  const cmd = [binName, key, ...ex.args].join(" ");
100
- lines.push(`- \`${cmd}\` \u2192 \`${ex.result}\``);
104
+ lines.push(`- \`${cmd}\` => \`${ex.result}\``);
101
105
  }
102
106
  }
103
107
  return lines.join("\n");
@@ -163,17 +167,18 @@ function renderReadmeSkill(binName, key, tool) {
163
167
  ${lines.join("\n")}
164
168
  \`\`\``;
165
169
  }
170
+ const tableBlock = rows ? `
171
+
172
+ | arg | type | description |
173
+ |-----|------|-------------|
174
+ ${rows}` : "";
166
175
  return `#### \`${key}\`
167
176
 
168
177
  ${tool.description}.
169
178
 
170
179
  \`\`\`sh
171
180
  ${usage}
172
- \`\`\`
173
-
174
- | arg | type | description |
175
- |-----|------|-------------|
176
- ${rows}${exampleBlock}`;
181
+ \`\`\`${tableBlock}${exampleBlock}`;
177
182
  }
178
183
  function describeReadmeType(schema) {
179
184
  let inner = schema;
@@ -287,6 +292,11 @@ function createUtilsServer() {
287
292
  [cnTool, caseConvertTool, truncateTool]
288
293
  );
289
294
  }
295
+ var server = createUtilsServer();
296
+ startServer(server).catch((err) => {
297
+ console.error("[utils] server error:", err);
298
+ process.exit(1);
299
+ });
290
300
  export {
291
301
  cn,
292
302
  createUtilsServer,
package/dist/server.js CHANGED
@@ -15,20 +15,20 @@ function text(content) {
15
15
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
16
16
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
17
17
  function createMcpServer(config, tools2) {
18
- const server2 = new McpServer(config);
18
+ const server3 = new McpServer(config);
19
19
  for (const tool of tools2) {
20
- server2.registerTool(
20
+ server3.registerTool(
21
21
  tool.name,
22
22
  { description: tool.description, inputSchema: tool.inputSchema },
23
23
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
24
  tool.handler
25
25
  );
26
26
  }
27
- return server2;
27
+ return server3;
28
28
  }
29
- async function startServer(server2) {
29
+ async function startServer(server3) {
30
30
  const transport = new StdioServerTransport();
31
- await server2.connect(transport);
31
+ await server3.connect(transport);
32
32
  }
33
33
 
34
34
  // ../common/kit/cli.ts
@@ -117,10 +117,15 @@ function createUtilsServer() {
117
117
  [cnTool, caseConvertTool, truncateTool]
118
118
  );
119
119
  }
120
-
121
- // src/server.ts
122
120
  var server = createUtilsServer();
123
121
  startServer(server).catch((err) => {
124
122
  console.error("[utils] server error:", err);
125
123
  process.exit(1);
126
124
  });
125
+
126
+ // src/server.ts
127
+ var server2 = createUtilsServer();
128
+ startServer(server2).catch((err) => {
129
+ console.error("[utils] server error:", err);
130
+ process.exit(1);
131
+ });
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: mono-rele2-utils
2
+ name: mono-rele2-utils-cli
3
3
  description: Use this skill to invoke text utility functions via the mono-rele2-utils CLI. Handles class name merging, case conversion, and text truncation.
4
4
  ---
5
5
 
6
- # mono-rele2-utils
6
+ # mono-rele2-utils-cli
7
7
 
8
8
  ```sh
9
- mono-rele2-utils <skillName> [...args]
9
+ mono-rele2-utils-cli <skillName> [...args]
10
10
  ```
11
11
 
12
12
  ## Skills
@@ -40,12 +40,12 @@ Truncates text to a maximum length and appends a suffix
40
40
 
41
41
  ## Examples
42
42
 
43
- - `mono-rele2-utils cnTool '["btn","active","large"]'` `btn active large`
44
- - `mono-rele2-utils caseConvertTool "hello world" camel` `helloWorld`
45
- - `mono-rele2-utils caseConvertTool "helloWorld" snake` `hello_world`
46
- - `mono-rele2-utils caseConvertTool "hello world" kebab` `hello-world`
47
- - `mono-rele2-utils truncateTool "hello world long text" 10` `hello w...`
48
- - `mono-rele2-utils truncateTool "hello world" 8 "…"` `hello w…`
43
+ - `mono-rele2-utils-cli cnTool '["btn","active","large"]'` => `btn active large`
44
+ - `mono-rele2-utils-cli caseConvertTool "hello world" camel` => `helloWorld`
45
+ - `mono-rele2-utils-cli caseConvertTool "helloWorld" snake` => `hello_world`
46
+ - `mono-rele2-utils-cli caseConvertTool "hello world" kebab` => `hello-world`
47
+ - `mono-rele2-utils-cli truncateTool "hello world long text" 10` => `hello w...`
48
+ - `mono-rele2-utils-cli truncateTool "hello world" 8 "…"` => `hello w…`
49
49
 
50
50
  ## Guidelines
51
51
 
@@ -53,4 +53,4 @@ Truncates text to a maximum length and appends a suffix
53
53
  - Numeric args are auto-parsed — pass as plain numbers (e.g. `10`)
54
54
  - Array args must be valid JSON — wrap in single quotes on Unix shells (e.g. `'["a","b"]'`)
55
55
  - Optional args with defaults may be omitted
56
- - Run `mono-rele2-utils` with no args to list all available skills
56
+ - Run `mono-rele2-utils-cli` with no args to list all available skills
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julong/mono-rele2-utils",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "Use this skill to invoke text utility functions via the mono-rele2-utils CLI. Handles class name merging, case conversion, and text truncation.",
5
5
  "license": "ISC",
6
6
  "type": "module",
@@ -11,8 +11,8 @@
11
11
  }
12
12
  },
13
13
  "bin": {
14
- "mcp-utils": "./dist/server.js",
15
- "mono-rele2-utils": "./dist/cli.js"
14
+ "mono-rele2-utils": "./dist/server.js",
15
+ "mono-rele2-utils-cli": "./dist/cli.js"
16
16
  },
17
17
  "files": [
18
18
  "dist"
@@ -23,8 +23,7 @@
23
23
  "scripts": {
24
24
  "build": "tsup",
25
25
  "typecheck": "tsc --noEmit",
26
- "clean": "rimraf dist",
27
- "update-readme": "node ../common/build/update-readme.mjs"
26
+ "clean": "rimraf dist"
28
27
  },
29
28
  "dependencies": {
30
29
  "@modelcontextprotocol/sdk": "^1.29.0",