mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
feat(cli): clean up wiki and sl commands
This commit is contained in:
parent
e1e9c4af91
commit
67b587f5d0
18 changed files with 311 additions and 585 deletions
|
|
@ -154,10 +154,9 @@ describe('standalone example docs', () => {
|
|||
for (const command of [
|
||||
'ktx status --json',
|
||||
'ktx sl list --json',
|
||||
'ktx sl read orders --json',
|
||||
'ktx sl search "revenue" --json',
|
||||
'ktx sl query --json',
|
||||
'ktx wiki search "revenue recognition" --json',
|
||||
'ktx wiki read order-status-definitions --json',
|
||||
]) {
|
||||
assert.match(servingAgents, new RegExp(command.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -729,23 +729,22 @@ try {
|
|||
'exec',
|
||||
'ktx',
|
||||
'sl',
|
||||
'list',
|
||||
'search',
|
||||
'orders',
|
||||
'--json',
|
||||
'--connection-id',
|
||||
'warehouse',
|
||||
'--query',
|
||||
'orders',
|
||||
'--project-dir',
|
||||
projectDir,
|
||||
]);
|
||||
const slSearchJson = parseJsonResult('ktx sl list', slSearch);
|
||||
const slSearchJson = parseJsonResult('ktx sl search', slSearch);
|
||||
assert.equal(slSearchJson.kind, 'list');
|
||||
assert.equal(slSearchJson.data.items.length, 1);
|
||||
assert.equal(slSearchJson.data.items[0].connectionId, 'warehouse');
|
||||
assert.equal(slSearchJson.data.items[0].name, 'orders');
|
||||
assert.equal(typeof slSearchJson.data.items[0].score, 'number');
|
||||
requireIncludes(slSearchJson.data.items[0].matchReasons, 'lexical', 'sl search match reasons');
|
||||
process.stdout.write('ktx sl list hybrid metadata verified\\n');
|
||||
process.stdout.write('ktx sl search hybrid metadata verified\\n');
|
||||
|
||||
const slQuery = await run('pnpm', ['exec', 'ktx', 'sl', 'query',
|
||||
'--connection-id',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue