@kkmila/cpc 1.0.0 → 1.0.1
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 +1 -1
- package/package.json +1 -1
- package/src/lib/repo.mjs +3 -4
package/README.md
CHANGED
package/package.json
CHANGED
package/src/lib/repo.mjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { realpathSync } from "node:fs";
|
|
2
1
|
import { resolve, dirname } from "node:path";
|
|
3
2
|
import { fileURLToPath } from "node:url";
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
|
-
* Resolve the
|
|
5
|
+
* Resolve the cpc repo root from the CLI script location.
|
|
7
6
|
* Handles symlinked installations (npm link, /usr/local/bin, ~/.local/bin).
|
|
8
7
|
*/
|
|
9
8
|
export function resolveRepoRoot() {
|
|
10
9
|
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
11
|
-
//
|
|
12
|
-
return resolve(scriptDir, "..", ".."
|
|
10
|
+
// src/lib/ → repo root is 2 levels up (lib → src → root)
|
|
11
|
+
return resolve(scriptDir, "..", "..");
|
|
13
12
|
}
|