@crmforall/connect 0.1.5 → 0.1.6

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.
@@ -49,11 +49,12 @@ async function collectDbSettings(json) {
49
49
  if (json || !(0, prompts_1.isInteractive)()) {
50
50
  return (0, contracts_1.jsonError)("init", contracts_1.ERROR_CODE.AUTH_FAILED, "비대화형 실행에서는 CRMFORALL_DB_URL(+CRMFORALL_DB_PASSWORD) 환경변수가 필요합니다. 비밀번호를 명령 인자로 넘기지 마세요.");
51
51
  }
52
- console.log("\nDB 접속 정보 (읽기 전용 계정 + CRM 스키마 쓰기 권한 권장)");
53
- const host = await (0, prompts_1.prompt)("호스트");
52
+ console.log("\nDB 접속 정보를 입력하세요. (읽기 전용 계정 + crmforall 스키마 CREATE 권한 권장)");
53
+ console.log("비밀번호는 화면에 표시되지 않고, 명령 인자·로그에 남지 않습니다.\n");
54
+ const host = await (0, prompts_1.prompt)("호스트 (예: db.internal.shop.com / localhost)");
54
55
  const port = Number(await (0, prompts_1.prompt)("포트", "5432"));
55
- const database = await (0, prompts_1.prompt)("데이터베이스");
56
- const user = await (0, prompts_1.prompt)("사용자");
56
+ const database = await (0, prompts_1.prompt)("데이터베이스 이름 (예: shop)");
57
+ const user = await (0, prompts_1.prompt)("사용자 (예: cfa_reader)");
57
58
  const password = await (0, prompts_1.promptHidden)("비밀번호 (입력 비표시)");
58
59
  const ssl = (await (0, prompts_1.prompt)("SSL 사용? (y/N)", "N")).toLowerCase() === "y";
59
60
  return { sourceType: "postgresql", host, port, database, user, password, ssl };
@@ -157,9 +158,10 @@ async function runInit(opts) {
157
158
  crmSchema: config.crmSchema,
158
159
  ready: true,
159
160
  nextSteps: [
160
- "connect doctor 환경 진단 재확인",
161
- "MCP 클라이언트에 crmforall-connector 등록하세요",
162
- "propose_field_mappingvalidate_mapping(persist=true)으로 필드 매핑을 확정하세요",
161
+ " (선택) 진단 재확인: npx @crmforall/connect doctor",
162
+ " AI에 커넥터 등록: claude mcp add crmforall-connector -- npx -y @crmforall/connector",
163
+ '③ Claude에서 한마디: "크렘포올 커넥터 온보딩을 진행해줘" 진단·매핑이 자동 진행돼요',
164
+ "④ 실시간 동기화(선택): npx @crmforall/connect sync --watch",
163
165
  ],
164
166
  });
165
167
  }
package/dist/index.js CHANGED
@@ -10,15 +10,24 @@ const program = new commander_1.Command();
10
10
  program
11
11
  .name("connect")
12
12
  .description("crmforall 커넥터 설치/진단 CLI. AI 도구(Claude Code 등)로 운전하려면 패키지의 AGENTS.md를 참조하세요.")
13
- .version("0.1.5");
13
+ .version("0.1.6");
14
14
  function emit(result, asJson) {
15
15
  if (asJson) {
16
16
  console.log(JSON.stringify(result, null, 2));
17
17
  }
18
18
  else if (result.ok) {
19
19
  console.log(`✓ ${result.command} 완료`);
20
- if (result.data)
21
- console.log(JSON.stringify(result.data, null, 2));
20
+ const data = result.data;
21
+ if (data) {
22
+ const { nextSteps, ...rest } = data;
23
+ if (Object.keys(rest).length)
24
+ console.log(JSON.stringify(rest, null, 2));
25
+ if (Array.isArray(nextSteps) && nextSteps.length) {
26
+ console.log("\n다음 단계:");
27
+ for (const s of nextSteps)
28
+ console.log(` ${s}`);
29
+ }
30
+ }
22
31
  }
23
32
  else {
24
33
  console.error(`✗ ${result.command} 실패 [${result.error?.code}]`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crmforall/connect",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "crmforall 커넥터 설치/진단 CLI — npx @crmforall/connect init --token=...",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {