@mutagent/cli 0.1.2 → 0.1.3

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/bin/cli.js CHANGED
@@ -13812,15 +13812,15 @@ function getSDKClient() {
13812
13812
  }
13813
13813
  return sdkClient;
13814
13814
  }
13815
- function validateApiKey(apiKey, endpoint) {
13816
- const config2 = loadConfig();
13817
- const client = new SDKClientWrapper({
13818
- bearerAuth: apiKey,
13819
- serverURL: endpoint,
13820
- workspaceId: config2.defaultWorkspace,
13821
- organizationId: config2.defaultOrganization
13822
- });
13823
- return client.listWorkspaces().then(() => true).catch(() => false);
13815
+ async function validateApiKey(apiKey, endpoint) {
13816
+ try {
13817
+ const response = await fetch(`${endpoint}/api/organizations`, {
13818
+ headers: { "x-api-key": apiKey }
13819
+ });
13820
+ return response.ok;
13821
+ } catch {
13822
+ return false;
13823
+ }
13824
13824
  }
13825
13825
 
13826
13826
  // src/lib/output.ts
@@ -17150,5 +17150,5 @@ program.addCommand(createWorkspacesCommand());
17150
17150
  program.addCommand(createProvidersCommand());
17151
17151
  program.parse();
17152
17152
 
17153
- //# debugId=01C136F9E7A5A54064756E2164756E21
17153
+ //# debugId=478A37FBB111956764756E2164756E21
17154
17154
  //# sourceMappingURL=cli.js.map