smithue-cli 0.10.0 → 0.11.0
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/cli.js +4 -4
- package/dist/commands/exec.d.ts +1 -3
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/exec.js +1 -5
- package/dist/commands/list.d.ts +0 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +1 -5
- package/dist/commands/search.d.ts +0 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +1 -5
- package/dist/commands/status.d.ts +0 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +0 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -52,7 +52,7 @@ program
|
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
await execCommand(command, parsedParams, { ...globals
|
|
55
|
+
await execCommand(command, parsedParams, { ...globals });
|
|
56
56
|
});
|
|
57
57
|
// ---------------------------------------------------------------------------
|
|
58
58
|
// list
|
|
@@ -62,7 +62,7 @@ program
|
|
|
62
62
|
.description('List available tools, optionally filtered by domain')
|
|
63
63
|
.action(async (domain) => {
|
|
64
64
|
const globals = program.opts();
|
|
65
|
-
await listCommand(domain, { ...globals
|
|
65
|
+
await listCommand(domain, { ...globals });
|
|
66
66
|
});
|
|
67
67
|
// ---------------------------------------------------------------------------
|
|
68
68
|
// search
|
|
@@ -72,7 +72,7 @@ program
|
|
|
72
72
|
.description('Search tools by keyword')
|
|
73
73
|
.action(async (keyword) => {
|
|
74
74
|
const globals = program.opts();
|
|
75
|
-
await searchCommand(keyword, { ...globals
|
|
75
|
+
await searchCommand(keyword, { ...globals });
|
|
76
76
|
});
|
|
77
77
|
// ---------------------------------------------------------------------------
|
|
78
78
|
// status
|
|
@@ -83,7 +83,7 @@ program
|
|
|
83
83
|
.option('--wait <seconds>', 'wait up to N seconds for editor to be ready', parseInt)
|
|
84
84
|
.action(async (cmdOpts) => {
|
|
85
85
|
const globals = program.opts();
|
|
86
|
-
await statusCommand({ ...globals, wait: cmdOpts.wait
|
|
86
|
+
await statusCommand({ ...globals, wait: cmdOpts.wait });
|
|
87
87
|
});
|
|
88
88
|
// ---------------------------------------------------------------------------
|
|
89
89
|
// use
|
package/dist/commands/exec.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { type DiscoverOpts } from '../portfile.js';
|
|
2
|
-
export
|
|
3
|
-
cliVersion?: string;
|
|
4
|
-
}
|
|
2
|
+
export type ExecOpts = DiscoverOpts;
|
|
5
3
|
export declare function execCommand(command: string, params: Record<string, unknown>, opts?: ExecOpts): Promise<void>;
|
|
6
4
|
//# sourceMappingURL=exec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/commands/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/commands/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAIjE,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC;AAEpC,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,GAAE,QAAa,GAClB,OAAO,CAAC,IAAI,CAAC,CASf"}
|
package/dist/commands/exec.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { discoverPort } from '../portfile.js';
|
|
2
2
|
import { SmithUEClient } from '../client.js';
|
|
3
3
|
import { printResult, printError } from '../output.js';
|
|
4
|
-
import { checkVersionCompat } from '../version-check.js';
|
|
5
4
|
export async function execCommand(command, params, opts = {}) {
|
|
6
5
|
try {
|
|
7
|
-
const
|
|
8
|
-
if (opts.cliVersion)
|
|
9
|
-
checkVersionCompat(opts.cliVersion, discovered.plugin_version);
|
|
10
|
-
const { port } = discovered;
|
|
6
|
+
const { port } = await discoverPort(opts);
|
|
11
7
|
const client = new SmithUEClient({ host: '127.0.0.1', port });
|
|
12
8
|
const result = await client.executeCommand(command, params);
|
|
13
9
|
printResult(result);
|
package/dist/commands/list.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAS3F"}
|
package/dist/commands/list.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { discoverPort } from '../portfile.js';
|
|
2
2
|
import { SmithUEClient } from '../client.js';
|
|
3
3
|
import { printResult, printError } from '../output.js';
|
|
4
|
-
import { checkVersionCompat } from '../version-check.js';
|
|
5
4
|
export async function listCommand(domain, opts) {
|
|
6
5
|
try {
|
|
7
|
-
const
|
|
8
|
-
if (opts.cliVersion)
|
|
9
|
-
checkVersionCompat(opts.cliVersion, discovered.plugin_version);
|
|
10
|
-
const { port } = discovered;
|
|
6
|
+
const { port } = await discoverPort(opts);
|
|
11
7
|
const client = new SmithUEClient({ host: '127.0.0.1', port });
|
|
12
8
|
const result = await client.listTools(domain);
|
|
13
9
|
printResult(result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBpF"}
|
package/dist/commands/search.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { discoverPort } from '../portfile.js';
|
|
2
2
|
import { SmithUEClient } from '../client.js';
|
|
3
3
|
import { printResult, printError } from '../output.js';
|
|
4
|
-
import { checkVersionCompat } from '../version-check.js';
|
|
5
4
|
export async function searchCommand(keyword, opts) {
|
|
6
5
|
try {
|
|
7
|
-
const
|
|
8
|
-
if (opts.cliVersion)
|
|
9
|
-
checkVersionCompat(opts.cliVersion, discovered.plugin_version);
|
|
10
|
-
const { port } = discovered;
|
|
6
|
+
const { port } = await discoverPort(opts);
|
|
11
7
|
const client = new SmithUEClient({ host: '127.0.0.1', port });
|
|
12
8
|
const domains = await client.listTools();
|
|
13
9
|
const kw = keyword.toLowerCase();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAMD,wBAAsB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA+CnE"}
|
package/dist/commands/status.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { SmithUEClient } from '../client.js';
|
|
2
2
|
import { discoverPort, SmithUEError } from '../portfile.js';
|
|
3
3
|
import { printResult, printError } from '../output.js';
|
|
4
|
-
import { checkVersionCompat } from '../version-check.js';
|
|
5
4
|
async function sleep(ms) {
|
|
6
5
|
await new Promise((resolve) => setTimeout(resolve, ms));
|
|
7
6
|
}
|
|
8
7
|
export async function statusCommand(opts) {
|
|
9
8
|
try {
|
|
10
9
|
const discovered = await discoverPort(opts);
|
|
11
|
-
if (opts.cliVersion)
|
|
12
|
-
checkVersionCompat(opts.cliVersion, discovered.plugin_version);
|
|
13
10
|
const client = new SmithUEClient({ host: '127.0.0.1', port: discovered.port });
|
|
14
11
|
if (opts.wait !== undefined && opts.wait > 0) {
|
|
15
12
|
const timeoutMs = opts.wait * 1000;
|