xtra-cli 0.1.0 → 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/dist/commands/ci.js
CHANGED
|
@@ -62,7 +62,7 @@ const fs = __importStar(require("fs"));
|
|
|
62
62
|
// Standalone, no Conf dependency — reads everything from environment variables
|
|
63
63
|
function getCiClient() {
|
|
64
64
|
const token = process.env.XTRA_MACHINE_TOKEN;
|
|
65
|
-
const apiUrl = process.env.XTRA_API_URL || "
|
|
65
|
+
const apiUrl = process.env.XTRA_API_URL || "https://xtra-security.vercel.app/api";
|
|
66
66
|
if (!token) {
|
|
67
67
|
ciError("XTRA_MACHINE_TOKEN environment variable is required for CI mode.");
|
|
68
68
|
}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -74,7 +74,7 @@ async function runChecks() {
|
|
|
74
74
|
checks.push({
|
|
75
75
|
name: "API URL",
|
|
76
76
|
status: apiUrl ? "pass" : "warn",
|
|
77
|
-
message: apiUrl || "Using default (
|
|
77
|
+
message: apiUrl || "Using default (https://xtra-security.vercel.app/api)",
|
|
78
78
|
});
|
|
79
79
|
// ── 4. API Reachability ──────────────────────────────────────────────────────
|
|
80
80
|
try {
|
package/dist/commands/init.js
CHANGED
|
@@ -143,7 +143,7 @@ exports.initCommand = new commander_1.Command("init")
|
|
|
143
143
|
project,
|
|
144
144
|
env,
|
|
145
145
|
branch,
|
|
146
|
-
apiUrl: process.env.XTRA_API_URL || "
|
|
146
|
+
apiUrl: process.env.XTRA_API_URL || "https://xtra-security.vercel.app/api",
|
|
147
147
|
createdAt: new Date().toISOString(),
|
|
148
148
|
};
|
|
149
149
|
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:
|
|
36
|
+
console.log(chalk_1.default.blue("Visit: https://xtra-security.vercel.app/integrations\n"));
|
|
37
37
|
process.exit(1);
|
|
38
38
|
}
|
|
39
39
|
console.log(chalk_1.default.green(`\nConnected as: ${status.username}`));
|
package/dist/commands/profile.js
CHANGED
package/dist/lib/config.js
CHANGED
|
@@ -8,12 +8,12 @@ const conf_1 = __importDefault(require("conf"));
|
|
|
8
8
|
const config = new conf_1.default({
|
|
9
9
|
projectName: "xtra-cli",
|
|
10
10
|
defaults: {
|
|
11
|
-
apiUrl: "
|
|
11
|
+
apiUrl: "https://xtra-security.vercel.app/api", // Default to production
|
|
12
12
|
},
|
|
13
13
|
});
|
|
14
14
|
const getConfig = () => ({
|
|
15
15
|
...config.store,
|
|
16
|
-
apiUrl: process.env.XTRA_API_URL || config.get("apiUrl") || "
|
|
16
|
+
apiUrl: process.env.XTRA_API_URL || config.get("apiUrl") || "https://xtra-security.vercel.app/api"
|
|
17
17
|
});
|
|
18
18
|
exports.getConfig = getConfig;
|
|
19
19
|
const getConfigValue = (key) => config.get(key);
|
package/dist/lib/profiles.js
CHANGED
|
@@ -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 || "
|
|
30
|
+
apiUrl: process.env.XTRA_API_URL || "https://xtra-security.vercel.app/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 || "
|
|
61
|
+
apiUrl: process.env.XTRA_API_URL || "https://xtra-security.vercel.app/api",
|
|
62
62
|
...data,
|
|
63
63
|
};
|
|
64
64
|
store.set("profiles", profiles);
|
package/package.json
CHANGED