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 CHANGED
@@ -52,7 +52,7 @@ program
52
52
  return;
53
53
  }
54
54
  }
55
- await execCommand(command, parsedParams, { ...globals, cliVersion });
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, cliVersion });
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, cliVersion });
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, cliVersion });
86
+ await statusCommand({ ...globals, wait: cmdOpts.wait });
87
87
  });
88
88
  // ---------------------------------------------------------------------------
89
89
  // use
@@ -1,6 +1,4 @@
1
1
  import { type DiscoverOpts } from '../portfile.js';
2
- export interface ExecOpts extends DiscoverOpts {
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;AAKjE,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,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,CAWf"}
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"}
@@ -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 discovered = await discoverPort(opts);
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);
@@ -2,7 +2,6 @@ export interface ListOpts {
2
2
  pid?: number;
3
3
  project?: string;
4
4
  port?: number;
5
- cliVersion?: string;
6
5
  }
7
6
  export declare function listCommand(domain: string | undefined, opts: ListOpts): Promise<void>;
8
7
  //# sourceMappingURL=list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAW3F"}
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"}
@@ -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 discovered = await discoverPort(opts);
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);
@@ -2,7 +2,6 @@ export interface SearchOpts {
2
2
  pid?: number;
3
3
  project?: string;
4
4
  port?: number;
5
- cliVersion?: string;
6
5
  }
7
6
  export declare function searchCommand(keyword: string, opts: SearchOpts): Promise<void>;
8
7
  //# sourceMappingURL=search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BpF"}
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"}
@@ -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 discovered = await discoverPort(opts);
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();
@@ -3,7 +3,6 @@ export interface StatusOpts {
3
3
  project?: string;
4
4
  port?: number;
5
5
  wait?: number;
6
- cliVersion?: string;
7
6
  }
8
7
  export declare function statusCommand(opts: StatusOpts): Promise<void>;
9
8
  //# sourceMappingURL=status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAKA,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;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD,wBAAsB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAgDnE"}
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"}
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smithue-cli",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "main": "dist/cli.js",
6
6
  "scripts": {