kibi-cli 0.1.4 → 0.1.5
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/prolog.d.ts.map +1 -1
- package/dist/prolog.js +20 -11
- package/package.json +3 -2
package/dist/prolog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prolog.d.ts","sourceRoot":"","sources":["../src/prolog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prolog.d.ts","sourceRoot":"","sources":["../src/prolog.ts"],"names":[],"mappings":"AA8FA,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,KAAK,CAAuC;IACpD,OAAO,CAAC,cAAc,CACyC;IAC/D,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,aAAa,CAA6B;gBAEtC,OAAO,GAAE,aAAkB;IAKjC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAoCd,YAAY;IAapB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAmF1D,eAAe,IAAI,IAAI;IAIvB,OAAO,CAAC,eAAe;YAYT,YAAY;IA0B1B,OAAO,CAAC,WAAW;IA8EnB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,cAAc;IA8BtB,SAAS,IAAI,OAAO;IAIpB,MAAM,IAAI,MAAM;IAIV,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CAyBjC"}
|
package/dist/prolog.js
CHANGED
|
@@ -50,22 +50,31 @@ import { fileURLToPath } from "node:url";
|
|
|
50
50
|
const importMetaDir = path.dirname(fileURLToPath(import.meta.url));
|
|
51
51
|
const require = createRequire(import.meta.url);
|
|
52
52
|
function resolveKbPlPath() {
|
|
53
|
-
|
|
53
|
+
const overrideKbPath = process.env.KIBI_KB_PL_PATH;
|
|
54
|
+
if (overrideKbPath && existsSync(overrideKbPath)) {
|
|
55
|
+
return overrideKbPath;
|
|
56
|
+
}
|
|
54
57
|
try {
|
|
55
|
-
const
|
|
56
|
-
const coreDir = path.dirname(corePkgJson);
|
|
57
|
-
const installedKbPl = path.join(coreDir, "src", "kb.pl");
|
|
58
|
+
const installedKbPl = require.resolve("kibi-core/src/kb.pl");
|
|
58
59
|
if (existsSync(installedKbPl))
|
|
59
60
|
return installedKbPl;
|
|
60
61
|
}
|
|
61
|
-
catch {
|
|
62
|
-
|
|
62
|
+
catch { }
|
|
63
|
+
const startDirs = [importMetaDir, process.cwd()];
|
|
64
|
+
for (const startDir of startDirs) {
|
|
65
|
+
let currentDir = path.resolve(startDir);
|
|
66
|
+
while (true) {
|
|
67
|
+
const candidate = path.join(currentDir, "packages", "core", "src", "kb.pl");
|
|
68
|
+
if (existsSync(candidate)) {
|
|
69
|
+
return candidate;
|
|
70
|
+
}
|
|
71
|
+
const parentDir = path.dirname(currentDir);
|
|
72
|
+
if (parentDir === currentDir) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
currentDir = parentDir;
|
|
76
|
+
}
|
|
63
77
|
}
|
|
64
|
-
// 2) Dev fallback for monorepo checkout
|
|
65
|
-
const devKbPl = path.resolve(importMetaDir, "../../core/src/kb.pl");
|
|
66
|
-
if (existsSync(devKbPl))
|
|
67
|
-
return devKbPl;
|
|
68
|
-
// 3) Hard fail with actionable message
|
|
69
78
|
throw new Error("Unable to resolve kb.pl. Expected kibi-core to be installed (node_modules) " +
|
|
70
79
|
"or to be running inside the monorepo checkout.");
|
|
71
80
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Kibi CLI for knowledge base management",
|
|
6
6
|
"engines": {
|
|
@@ -46,15 +46,16 @@
|
|
|
46
46
|
},
|
|
47
47
|
"types": "./dist/cli.d.ts",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"kibi-core": "^0.1.4",
|
|
50
49
|
"ajv": "^8.12.0",
|
|
51
50
|
"cli-table3": "^0.6.5",
|
|
52
51
|
"commander": "^11.0.0",
|
|
53
52
|
"fast-glob": "^3.2.12",
|
|
54
53
|
"gray-matter": "^4.0.3",
|
|
55
54
|
"js-yaml": "^4.1.0",
|
|
55
|
+
"kibi-core": "^0.1.5",
|
|
56
56
|
"ts-morph": "^23.0.0"
|
|
57
57
|
},
|
|
58
|
+
|
|
58
59
|
"license": "AGPL-3.0-or-later",
|
|
59
60
|
"author": "Piotr Franczyk",
|
|
60
61
|
"repository": {
|