@mitsein-ai/cli 0.1.1 → 0.1.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/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "consola": "^3.4.2",
8
8
  "ofetch": "^1.4.1"
9
9
  },
10
- "description": "Mitsein CLI dev tooling, API helpers, and workflow automation",
10
+ "description": "Mitsein CLI \u2014 dev tooling, API helpers, and workflow automation",
11
11
  "devDependencies": {
12
12
  "@types/bun": "latest",
13
13
  "typescript": "^5.3.3"
@@ -45,5 +45,5 @@
45
45
  "typecheck": "tsc --noEmit"
46
46
  },
47
47
  "type": "module",
48
- "version": "0.1.1"
48
+ "version": "0.1.2"
49
49
  }
@@ -1,5 +1,4 @@
1
1
  import type { Command } from 'commander';
2
- import { ApiClient } from '../core/client.js';
3
2
  import { resolveCredentials } from '../core/credentials.js';
4
3
  import { getOpenapiCachePath } from '../core/config.js';
5
4
  import { handleErrors } from '../core/errors.js';
@@ -53,15 +52,14 @@ export function registerDev(parent: Command): void {
53
52
  .action(
54
53
  handleErrors(async function devHealthAction(this: Command) {
55
54
  const g = readGlobals(this);
56
- const client = ApiClient.fromOptions({
57
- token: g.token,
58
- endpoint: g.endpoint,
59
- profile: g.profile ?? 'e2e',
60
- real: g.real,
61
- timeoutSec: httpTimeoutSec(g),
62
- debug: g.debug,
55
+ const endpoint = g.endpoint ?? (await import('../core/config.js')).DEFAULT_ENDPOINT;
56
+ const { ofetch } = await import('ofetch');
57
+ const timeoutMs = httpTimeoutSec(g);
58
+ const result = await ofetch('/health', {
59
+ baseURL: endpoint.replace(/\/$/, ''),
60
+ timeout: timeoutMs ? timeoutMs * 1000 : undefined,
61
+ retry: 0,
63
62
  });
64
- const result = await client.get('/health');
65
63
  emit(result, healthHuman);
66
64
  })
67
65
  );