xtra-cli 1.0.0 → 1.0.1

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.
@@ -63,7 +63,7 @@ const config_1 = require("../lib/config");
63
63
  // Standalone, no Conf dependency — reads everything from environment variables
64
64
  function getCiClient() {
65
65
  const token = process.env.XTRA_MACHINE_TOKEN;
66
- const apiUrl = process.env.XTRA_API_URL || "https://xtra-security.vercel.app/api";
66
+ const apiUrl = process.env.XTRA_API_URL || "https://www.xtrasecurity.in/api";
67
67
  if (!token) {
68
68
  ciError("XTRA_MACHINE_TOKEN environment variable is required for CI mode.");
69
69
  }
@@ -71,7 +71,7 @@ async function runChecks() {
71
71
  message: token ? `Set (${token.substring(0, 8)}...)` : "Not set — run 'xtra login'",
72
72
  });
73
73
  // 3. API URL Configured
74
- const apiUrl = config.apiUrl || process.env.XTRA_API_URL || "https://xtra-security.vercel.app/api";
74
+ const apiUrl = config.apiUrl || process.env.XTRA_API_URL || "https://www.xtrasecurity.in/api";
75
75
  checks.push({
76
76
  name: "API URL",
77
77
  status: config.apiUrl || process.env.XTRA_API_URL ? "pass" : "warn",
@@ -90,7 +90,7 @@ exports.initCommand = new commander_1.Command("init")
90
90
  // API might return { projects: [...] } or directly an array
91
91
  remoteProjects = Array.isArray(result) ? result : result.projects ?? [];
92
92
  if (remoteProjects.length === 0) {
93
- apiSpinner.warn(chalk_1.default.yellow("No projects found in your workspace. Create one at xtra-security.vercel.app first."));
93
+ apiSpinner.warn(chalk_1.default.yellow("No projects found in your workspace. Create one at www.xtrasecurity.in first."));
94
94
  }
95
95
  else {
96
96
  apiSpinner.succeed(`Found ${remoteProjects.length} project${remoteProjects.length > 1 ? "s" : ""}`);
@@ -177,7 +177,7 @@ exports.initCommand = new commander_1.Command("init")
177
177
  project,
178
178
  env,
179
179
  branch,
180
- apiUrl: process.env.XTRA_API_URL || "https://xtra-security.vercel.app/api",
180
+ apiUrl: process.env.XTRA_API_URL || "https://www.xtrasecurity.in/api",
181
181
  createdAt: new Date().toISOString(),
182
182
  };
183
183
  fs.writeFileSync(rcPath, JSON.stringify(rc, null, 2), "utf8");
@@ -33,7 +33,7 @@ exports.integrationCommand
33
33
  const status = await api_1.api.getIntegrationStatus("github");
34
34
  if (!status.connected) {
35
35
  console.log(chalk_1.default.yellow("\nGitHub not connected. Please connect via the web dashboard first."));
36
- console.log(chalk_1.default.blue("Visit: https://xtra-security.vercel.app/integrations\n"));
36
+ console.log(chalk_1.default.blue("Visit: https://www.xtrasecurity.in/integrations\n"));
37
37
  process.exit(1);
38
38
  }
39
39
  console.log(chalk_1.default.green(`\nConnected as: ${status.username}`));
@@ -188,7 +188,7 @@ async function handleSSOLogin() {
188
188
  let { apiUrl } = require("../lib/config").getConfig();
189
189
  // Hard fallback if getConfig somehow returned the old cached localhost
190
190
  if (apiUrl.includes("localhost")) {
191
- apiUrl = "https://xtra-security.vercel.app/api";
191
+ apiUrl = "https://www.xtrasecurity.in/api";
192
192
  }
193
193
  const ssoUrl = `${apiUrl}/auth/cli/sso?callbackUrl=${encodeURIComponent(callbackUrl)}`;
194
194
  console.log(chalk_1.default.blue(`Waiting for browser login... (Opening ${ssoUrl})`));
@@ -68,7 +68,7 @@ exports.profileCommand
68
68
  type: "input",
69
69
  name: "url",
70
70
  message: "API URL:",
71
- default: "https://xtra-security.vercel.app/api",
71
+ default: "https://www.xtrasecurity.in/api",
72
72
  },
73
73
  {
74
74
  type: "input",
@@ -75,7 +75,7 @@ const updateConfigs = (projectId, projectName) => {
75
75
  if (!rc.env)
76
76
  rc.env = "development";
77
77
  if (!rc.apiUrl)
78
- rc.apiUrl = (0, config_1.getConfigValue)("apiUrl") || "https://xtra-security.vercel.app/api";
78
+ rc.apiUrl = (0, config_1.getConfigValue)("apiUrl") || "https://www.xtrasecurity.in/api";
79
79
  try {
80
80
  fs.writeFileSync(rcPath, JSON.stringify(rc, null, 2), "utf8");
81
81
  console.log(chalk_1.default.gray(` ✔ Updated local .xtrarc (Project context locked to this folder)`));
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getRcConfig = exports.getProjectConfig = exports.getAuthToken = exports.clearConfig = exports.setConfig = exports.getConfigValue = exports.getConfig = void 0;
7
7
  const conf_1 = __importDefault(require("conf"));
8
- const PRODUCTION_API_URL = "https://xtra-security.vercel.app/api";
8
+ const PRODUCTION_API_URL = "https://www.xtrasecurity.in/api";
9
9
  const config = new conf_1.default({
10
10
  projectName: "xtra-cli",
11
11
  defaults: {
@@ -27,7 +27,7 @@ const store = new conf_1.default({
27
27
  activeProfile: "default",
28
28
  profiles: {
29
29
  default: {
30
- apiUrl: process.env.XTRA_API_URL || "https://xtra-security.vercel.app/api",
30
+ apiUrl: process.env.XTRA_API_URL || "https://www.xtrasecurity.in/api",
31
31
  },
32
32
  },
33
33
  },
@@ -58,7 +58,7 @@ function createProfile(name, data = {}) {
58
58
  throw new Error(`Profile '${name}' already exists. Use 'xtra profile set' to edit it.`);
59
59
  }
60
60
  profiles[name] = {
61
- apiUrl: process.env.XTRA_API_URL || "https://xtra-security.vercel.app/api",
61
+ apiUrl: process.env.XTRA_API_URL || "https://www.xtrasecurity.in/api",
62
62
  ...data,
63
63
  };
64
64
  store.set("profiles", profiles);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtra-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI for XtraSecurity Platform",
5
5
  "main": "dist/index.js",
6
6
  "bin": {