create-line-harness 0.1.0 → 0.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.
Files changed (2) hide show
  1. package/dist/index.js +12 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -445,9 +445,17 @@ function generateMcpConfig(options) {
445
445
  if (!mcpConfig.mcpServers) {
446
446
  mcpConfig.mcpServers = {};
447
447
  }
448
- mcpConfig.mcpServers["line-harness"] = newServerConfig;
448
+ let serverName = "line-harness";
449
+ if (mcpConfig.mcpServers["line-harness"]) {
450
+ const suffix = options.apiKey.slice(0, 8);
451
+ serverName = `line-harness-${suffix}`;
452
+ p9.log.info(
453
+ `\u65E2\u5B58\u306E line-harness \u8A2D\u5B9A\u304C\u3042\u308B\u305F\u3081\u3001${serverName} \u3068\u3057\u3066\u8FFD\u52A0\u3057\u307E\u3059`
454
+ );
455
+ }
456
+ mcpConfig.mcpServers[serverName] = newServerConfig;
449
457
  writeFileSync4(mcpJsonPath, JSON.stringify(mcpConfig, null, 2) + "\n");
450
- p9.log.success(".mcp.json \u306B MCP \u8A2D\u5B9A\u3092\u8FFD\u52A0\u3057\u307E\u3057\u305F");
458
+ p9.log.success(`.mcp.json \u306B MCP \u8A2D\u5B9A\u3092\u8FFD\u52A0\u3057\u307E\u3057\u305F\uFF08${serverName}\uFF09`);
451
459
  }
452
460
 
453
461
  // src/lib/crypto.ts
@@ -531,8 +539,8 @@ async function runSetup(repoDir) {
531
539
  message: "LIFF ID",
532
540
  placeholder: "\u30C1\u30E3\u30CD\u30EBID-\u30E9\u30F3\u30C0\u30E0\u6587\u5B57\u5217\uFF08\u4F8B: 2009554425-4IMBmLQ9\uFF09",
533
541
  validate(value) {
534
- if (!value || value.trim().length < 5) {
535
- return "LIFF ID \u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044";
542
+ if (!value || !value.includes("-")) {
543
+ return "LIFF ID \u306F\u300C\u30C1\u30E3\u30CD\u30EBID-\u30E9\u30F3\u30C0\u30E0\u6587\u5B57\u5217\u300D\u306E\u5F62\u5F0F\u3067\u3059\uFF08\u4F8B: 2009554425-4IMBmLQ9\uFF09";
536
544
  }
537
545
  }
538
546
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-line-harness",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Set up LINE Harness — AI-operated LINE CRM — with one command",
5
5
  "type": "module",
6
6
  "bin": {