@kitelev/exocortex-cli 15.22.1 → 15.22.2
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 +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// @kitelev/exocortex-cli v15.22.
|
|
2
|
+
// @kitelev/exocortex-cli v15.22.2
|
|
3
3
|
// CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more
|
|
4
4
|
// License: MIT
|
|
5
5
|
|
|
@@ -572,7 +572,7 @@ Continue? (y/n): `,s=>{r.close(),i(s.toLowerCase()==="y"||s.toLowerCase()==="yes
|
|
|
572
572
|
ORDER BY DESC(?usageCount)
|
|
573
573
|
`;a=s.parse(p),c=new Kt.AlgebraTranslator,l=c.translate(a),u=new Kt.AlgebraOptimizer,l=u.optimize(l);let S=(await f.executeAll(l)).map(A=>{let P=A.get("property"),M=A.get("usageCount");return{name:P?bC(P.toString()):"unknown",usageCount:M?parseInt(M.toString(),10):0}}),E={name:e,instanceCount:d,properties:S};if(r==="json"||t.format==="json"){let A=ve.success(E);console.log(JSON.stringify(A,null,2))}else{if(console.log(`\u{1F4CB} Class: ${e}
|
|
574
574
|
`),console.log(` Instances: ${d}`),console.log(` Properties: ${S.length}
|
|
575
|
-
`),S.length===0){console.log(" No properties found.");return}let A=Math.max(...S.map(P=>P.name.length),10);console.log(" \u250C"+"\u2500".repeat(A+2)+"\u252C"+"\u2500".repeat(10)+"\u2510"),console.log(" \u2502 "+"Property".padEnd(A)+" \u2502 "+"Usage".padEnd(8)+" \u2502"),console.log(" \u251C"+"\u2500".repeat(A+2)+"\u253C"+"\u2500".repeat(10)+"\u2524");for(let P of S)console.log(" \u2502 "+P.name.padEnd(A)+" \u2502 "+P.usageCount.toString().padStart(8)+" \u2502");console.log(" \u2514"+"\u2500".repeat(A+2)+"\u2534"+"\u2500".repeat(10)+"\u2518")}}o(dV,"showClassDetails");function bC(n){let e=n.replace(/^<|>$/g,""),t=e.lastIndexOf("#");if(t!==-1)return e.substring(t+1);let r=e.lastIndexOf("/");return r!==-1?e.substring(r+1):e}o(bC,"extractLocalName");var Cn=new ct;Cn.name("exocortex").description("CLI tool for Exocortex knowledge management system").version("15.22.
|
|
575
|
+
`),S.length===0){console.log(" No properties found.");return}let A=Math.max(...S.map(P=>P.name.length),10);console.log(" \u250C"+"\u2500".repeat(A+2)+"\u252C"+"\u2500".repeat(10)+"\u2510"),console.log(" \u2502 "+"Property".padEnd(A)+" \u2502 "+"Usage".padEnd(8)+" \u2502"),console.log(" \u251C"+"\u2500".repeat(A+2)+"\u253C"+"\u2500".repeat(10)+"\u2524");for(let P of S)console.log(" \u2502 "+P.name.padEnd(A)+" \u2502 "+P.usageCount.toString().padStart(8)+" \u2502");console.log(" \u2514"+"\u2500".repeat(A+2)+"\u2534"+"\u2500".repeat(10)+"\u2518")}}o(dV,"showClassDetails");function bC(n){let e=n.replace(/^<|>$/g,""),t=e.lastIndexOf("#");if(t!==-1)return e.substring(t+1);let r=e.lastIndexOf("/");return r!==-1?e.substring(r+1):e}o(bC,"extractLocalName");var Cn=new ct;Cn.name("exocortex").description("CLI tool for Exocortex knowledge management system").version("15.22.2");var Q2=Cn.command("sparql").description("SPARQL query execution and cache management");Q2.addCommand(Ux());Q2.addCommand(Wx());Q2.addCommand(Hx());Cn.addCommand(ZA());Cn.addCommand(rC());Cn.addCommand(nC());Cn.addCommand(sC());Cn.addCommand(aC());Cn.addCommand(fC());Cn.addCommand(mC());Cn.addCommand(vC());Cn.addCommand(wC());Cn.parse();
|
|
576
576
|
/*! Bundled license information:
|
|
577
577
|
|
|
578
578
|
reflect-metadata/Reflect.js:
|