@promptowl/contextnest-cli 0.5.0 → 0.5.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/dist/index.js +17 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33051,9 +33051,24 @@ function buildTreeLines(paths) {
|
|
|
33051
33051
|
|
|
33052
33052
|
// src/index.ts
|
|
33053
33053
|
var program = new Command();
|
|
33054
|
-
program.name("ctx").description("Context Nest CLI \u2014 manage structured, versioned context vaults").version("0.5.
|
|
33054
|
+
program.name("ctx").description("Context Nest CLI \u2014 manage structured, versioned context vaults").version("0.5.1");
|
|
33055
33055
|
function getVaultRoot() {
|
|
33056
|
-
|
|
33056
|
+
if (process.env.CONTEXTNEST_VAULT_PATH) {
|
|
33057
|
+
return process.env.CONTEXTNEST_VAULT_PATH;
|
|
33058
|
+
}
|
|
33059
|
+
let dir = process.cwd();
|
|
33060
|
+
while (true) {
|
|
33061
|
+
const configPath = pathMod2.join(dir, ".context", "config.yaml");
|
|
33062
|
+
try {
|
|
33063
|
+
fs2.statSync(configPath);
|
|
33064
|
+
return dir;
|
|
33065
|
+
} catch {
|
|
33066
|
+
}
|
|
33067
|
+
const parent = pathMod2.dirname(dir);
|
|
33068
|
+
if (parent === dir) break;
|
|
33069
|
+
dir = parent;
|
|
33070
|
+
}
|
|
33071
|
+
return process.cwd();
|
|
33057
33072
|
}
|
|
33058
33073
|
function getStorage() {
|
|
33059
33074
|
return new NestStorage(getVaultRoot());
|