@ninebone/mcp 1.0.8 → 1.0.10

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@ninebone/mcp",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "NineQuery AI Connector for Database",
5
- "main": "src/index.mjs",
5
+ "main": "src/index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "nine-mcp": "src/index.mjs"
8
+ "nine-mcp": "src/index.js"
9
9
  },
10
10
  "scripts": {
11
- "start": "node src/index.mjs",
12
- "dev": "node --watch src/index.mjs",
11
+ "start": "node src/index.js",
12
+ "dev": "node --watch src/index.js",
13
13
  "build": "echo '빌드가 필요한 프로젝트라면 여기에 빌드 명령 작성'",
14
14
  "release": "npm version patch && npm run build && npm publish"
15
15
  },
package/src/core/init.js CHANGED
@@ -54,6 +54,9 @@ async function createEnvFile(rl) {
54
54
  return true;
55
55
  }
56
56
 
57
+
58
+
59
+
57
60
  /**
58
61
  * 2. 프롬프트 파일(.md) 자동 복사 함수 (개선됨)
59
62
  */
@@ -105,6 +108,33 @@ function createPromptFiles() {
105
108
  }
106
109
  }
107
110
 
111
+
112
+ function createEcosystemFile() {
113
+ const filePath = path.join(process.cwd(), 'ecosystem.config.js');
114
+ const content = `module.exports = {
115
+ apps: [{
116
+ name: "nine-mcp",
117
+ script: "./src/index.js",
118
+ interpreter: "node",
119
+ node_args: "--input-type=module"
120
+ }]
121
+ };
122
+ `;
123
+ fs.writeFileSync(filePath, content);
124
+ console.log(' └⚙️ ecosystem.config.js 생성 완료 (PM2 실행용)');
125
+ }
126
+
127
+ // 2. runInit 함수 내부에서 createPromptFiles() 실행 후 바로 호출하세요.
128
+ export async function runInit() {
129
+ // ...
130
+ if (success) {
131
+ createPromptFiles();
132
+ createEcosystemFile(); // <--- 여기 추가!
133
+ createEcosystemFile();
134
+ console.log('\n✅ 모든 초기화 작업이 완료되었습니다.');
135
+ // ...
136
+ }
137
+ }
108
138
  /**
109
139
  * 메인 실행 함수
110
140
  */
@@ -1,11 +0,0 @@
1
- module.exports = {
2
- apps: [{
3
- name: "nine-mcp",
4
- // 파일 경로를 적는 대신, 등록된 명령어(bin) 이름을 적습니다.
5
- script: "node_modules/@ninebone/mcp/src/pm2-wrapper.js",
6
- // PM2에게 이 명령어는 'node'로 실행하라고 명시합니다.
7
- interpreter: "node",
8
- // 핵심 옵션
9
- node_args: "--input-type=module"
10
- }]
11
- }
@@ -1,10 +0,0 @@
1
- // src/pm2-wrapper.js
2
- import { spawn } from 'child_process';
3
- import path from 'path';
4
- import { fileURLToPath } from 'url';
5
-
6
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
- // __dirname을 사용하므로, 누가 어디에 설치해도 경로가 자동으로 잡힙니다.
8
- const indexPath = path.join(__dirname, 'index.mjs');
9
-
10
- spawn('node', ['--input-type=module', indexPath], { stdio: 'inherit' });
File without changes