@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/index.js CHANGED
@@ -13797,15 +13797,15 @@ function getSDKClient() {
13797
13797
  }
13798
13798
  return sdkClient;
13799
13799
  }
13800
- function validateApiKey(apiKey, endpoint) {
13801
- const config2 = loadConfig();
13802
- const client = new SDKClientWrapper({
13803
- bearerAuth: apiKey,
13804
- serverURL: endpoint,
13805
- workspaceId: config2.defaultWorkspace,
13806
- organizationId: config2.defaultOrganization
13807
- });
13808
- return client.listWorkspaces().then(() => true).catch(() => false);
13800
+ async function validateApiKey(apiKey, endpoint) {
13801
+ try {
13802
+ const response = await fetch(`${endpoint}/api/organizations`, {
13803
+ headers: { "x-api-key": apiKey }
13804
+ });
13805
+ return response.ok;
13806
+ } catch {
13807
+ return false;
13808
+ }
13809
13809
  }
13810
13810
  // src/lib/output.ts
13811
13811
  import chalk from "chalk";
@@ -13943,5 +13943,5 @@ export {
13943
13943
  ApiError
13944
13944
  };
13945
13945
 
13946
- //# debugId=067FB447BB6D87B164756E2164756E21
13946
+ //# debugId=460687AAB930C83264756E2164756E21
13947
13947
  //# sourceMappingURL=index.js.map