@simplysm/claude 13.0.0-beta.23 → 13.0.0-beta.24

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@simplysm/claude",
3
3
  "sideEffects": false,
4
- "version": "13.0.0-beta.23",
4
+ "version": "13.0.0-beta.24",
5
5
  "description": "Simplysm Claude Code skills/agents — auto-installs via postinstall",
6
6
  "author": "김석래",
7
7
  "repository": {
@@ -11,10 +11,19 @@ try {
11
11
  const pkgRoot = path.resolve(__dirname, "..");
12
12
  const sourceDir = path.join(pkgRoot, "claude");
13
13
 
14
- // INIT_CWD: pnpm/npm 명령이 실행된 원래 디렉토리 (프로젝트 루트)
15
- const projectRoot = process.env.INIT_CWD;
14
+ // INIT_CWD: npm/yarn이 설정하는 프로젝트 루트 경로
15
+ // pnpm은 INIT_CWD를 설정하지 않으므로 (https://github.com/pnpm/pnpm/issues/7042)
16
+ // 스크립트 경로에서 첫 번째 node_modules 이전 경로를 프로젝트 루트로 사용
17
+ const projectRoot =
18
+ process.env.INIT_CWD ||
19
+ (() => {
20
+ const sep = path.sep;
21
+ const marker = sep + "node_modules" + sep;
22
+ const idx = __dirname.indexOf(marker);
23
+ return idx !== -1 ? __dirname.substring(0, idx) : null;
24
+ })();
16
25
  if (!projectRoot) {
17
- console.log("[sd-claude] INIT_CWD가 설정되지 않아 건너뜁니다.");
26
+ console.log("[@simplysm/claude] 프로젝트 루트를 찾을 수 없어 건너뜁니다.");
18
27
  process.exit(0);
19
28
  }
20
29