estatehelm 1.0.1 → 1.0.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/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1314,6 +1314,16 @@ var KEYTAR_ACCOUNTS = {
|
|
|
1314
1314
|
};
|
|
1315
1315
|
var API_BASE_URL = process.env.ESTATEHELM_API_URL || "https://api.estatehelm.com";
|
|
1316
1316
|
var APP_URL = process.env.ESTATEHELM_APP_URL || "https://app.estatehelm.com";
|
|
1317
|
+
function setServerUrls(apiUrl, appUrl) {
|
|
1318
|
+
if (apiUrl) {
|
|
1319
|
+
API_BASE_URL = apiUrl;
|
|
1320
|
+
console.error(`[Config] Using API: ${apiUrl}`);
|
|
1321
|
+
}
|
|
1322
|
+
if (appUrl) {
|
|
1323
|
+
APP_URL = appUrl;
|
|
1324
|
+
console.error(`[Config] Using App: ${appUrl}`);
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1317
1327
|
var DEFAULT_CONFIG = {
|
|
1318
1328
|
defaultMode: "full"
|
|
1319
1329
|
};
|
|
@@ -1584,7 +1594,7 @@ async function login() {
|
|
|
1584
1594
|
console.log("Starting authentication server...");
|
|
1585
1595
|
const port = await findAvailablePort();
|
|
1586
1596
|
const callbackUrl = `http://127.0.0.1:${port}/callback`;
|
|
1587
|
-
const loginUrl = `${APP_URL}/
|
|
1597
|
+
const loginUrl = `${APP_URL}/cli-auth?callback=${encodeURIComponent(callbackUrl)}`;
|
|
1588
1598
|
console.log(`
|
|
1589
1599
|
Opening browser for authentication...`);
|
|
1590
1600
|
console.log(`If the browser doesn't open, visit: ${loginUrl}
|
|
@@ -2865,7 +2875,14 @@ function searchEntity(entity, query) {
|
|
|
2865
2875
|
|
|
2866
2876
|
// src/index.ts
|
|
2867
2877
|
var program = new import_commander.Command();
|
|
2868
|
-
program.name("estatehelm").description("EstateHelm CLI - MCP server for AI assistants").version("1.0.0")
|
|
2878
|
+
program.name("estatehelm").description("EstateHelm CLI - MCP server for AI assistants").version("1.0.0").option("--staging", "Use staging environment (previewapi/previewapp.estatehelm.com)").option("--api-url <url>", "API server URL (default: https://api.estatehelm.com)").option("--app-url <url>", "App server URL (default: https://app.estatehelm.com)").hook("preAction", (thisCommand) => {
|
|
2879
|
+
const opts = thisCommand.opts();
|
|
2880
|
+
if (opts.staging) {
|
|
2881
|
+
setServerUrls("https://previewapi.estatehelm.com", "https://previewapp.estatehelm.com");
|
|
2882
|
+
} else if (opts.apiUrl || opts.appUrl) {
|
|
2883
|
+
setServerUrls(opts.apiUrl, opts.appUrl);
|
|
2884
|
+
}
|
|
2885
|
+
});
|
|
2869
2886
|
program.command("login").description("Authenticate with EstateHelm").action(async () => {
|
|
2870
2887
|
try {
|
|
2871
2888
|
await login();
|