@edgible-team/cli 1.2.1 → 1.2.4
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/LICENSE +2 -0
- package/dist/client/api-client.d.ts +51 -0
- package/dist/client/api-client.d.ts.map +1 -1
- package/dist/client/api-client.js +65 -0
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +6 -1
- package/dist/commands/ai.d.ts.map +1 -1
- package/dist/commands/ai.js +23 -20
- package/dist/commands/application.d.ts.map +1 -1
- package/dist/commands/application.js +713 -94
- package/dist/generated/compose-constants.d.ts +14 -0
- package/dist/generated/compose-constants.d.ts.map +1 -0
- package/dist/generated/compose-constants.js +22 -0
- package/dist/interfaces/IDaemonManager.d.ts +11 -1
- package/dist/interfaces/IDaemonManager.d.ts.map +1 -1
- package/dist/services/application/ApplicationService.d.ts +41 -0
- package/dist/services/application/ApplicationService.d.ts.map +1 -1
- package/dist/services/application/ApplicationService.js +107 -0
- package/dist/services/daemon/DockerDaemonManager.d.ts +4 -1
- package/dist/services/daemon/DockerDaemonManager.d.ts.map +1 -1
- package/dist/services/daemon/DockerDaemonManager.js +1 -1
- package/dist/services/daemon/LaunchdDaemonManager.d.ts +4 -1
- package/dist/services/daemon/LaunchdDaemonManager.d.ts.map +1 -1
- package/dist/services/daemon/LaunchdDaemonManager.js +70 -26
- package/dist/services/daemon/PodmanDaemonManager.d.ts +4 -1
- package/dist/services/daemon/PodmanDaemonManager.d.ts.map +1 -1
- package/dist/services/daemon/PodmanDaemonManager.js +1 -1
- package/dist/services/daemon/SystemdDaemonManager.d.ts +4 -1
- package/dist/services/daemon/SystemdDaemonManager.d.ts.map +1 -1
- package/dist/services/daemon/SystemdDaemonManager.js +1 -1
- package/dist/services/daemon/WindowsServiceDaemonManager.d.ts +4 -1
- package/dist/services/daemon/WindowsServiceDaemonManager.d.ts.map +1 -1
- package/dist/services/daemon/WindowsServiceDaemonManager.js +3 -2
- package/dist/types/AgentConfig.d.ts +13 -0
- package/dist/types/AgentConfig.d.ts.map +1 -1
- package/dist/types/ApiRequests.d.ts +8 -0
- package/dist/types/ApiRequests.d.ts.map +1 -1
- package/dist/types/Application.d.ts +6 -0
- package/dist/types/Application.d.ts.map +1 -1
- package/dist/types/CaddyJson.d.ts +43 -1
- package/dist/types/CaddyJson.d.ts.map +1 -1
- package/dist/types/models/ApplicationApiKey.d.ts +63 -0
- package/dist/types/models/ApplicationApiKey.d.ts.map +1 -0
- package/dist/types/models/ApplicationApiKey.js +5 -0
- package/dist/types/models/ApplicationAuthExchangeToken.d.ts +69 -0
- package/dist/types/models/ApplicationAuthExchangeToken.d.ts.map +1 -0
- package/dist/types/models/ApplicationAuthExchangeToken.js +5 -0
- package/dist/types/models/ApplicationAuthSession.d.ts +68 -0
- package/dist/types/models/ApplicationAuthSession.d.ts.map +1 -0
- package/dist/types/models/ApplicationAuthSession.js +5 -0
- package/dist/types/models/ApplicationData.d.ts +33 -0
- package/dist/types/models/ApplicationData.d.ts.map +1 -1
- package/dist/types/models/ApplicationShortCode.d.ts +79 -0
- package/dist/types/models/ApplicationShortCode.d.ts.map +1 -0
- package/dist/types/models/ApplicationShortCode.js +5 -0
- package/dist/types/route.d.ts +4 -0
- package/dist/types/route.d.ts.map +1 -1
- package/dist/types/validation/schemas.d.ts +21 -0
- package/dist/types/validation/schemas.d.ts.map +1 -1
- package/dist/types/validation/schemas.js +14 -1
- package/dist/utils/PathResolver.d.ts +14 -0
- package/dist/utils/PathResolver.d.ts.map +1 -1
- package/dist/utils/PathResolver.js +24 -0
- package/package.json +2 -2
- package/recipes/compose/open-webui/docker-compose.yml +26 -1
- package/dist/detection/tools.d.ts +0 -16
- package/dist/detection/tools.d.ts.map +0 -1
- package/dist/detection/tools.js +0 -305
- package/recipes/compose/open-webui/.env +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/types/validation/schemas.ts"],"names":[],"mappings":"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;AAC/D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAC3F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACjF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACjF,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC"}
|
|
@@ -35,6 +35,10 @@ exports.GetUserSchema = zod_1.z.object({
|
|
|
35
35
|
email: zod_1.z.string().email('Invalid email format'),
|
|
36
36
|
});
|
|
37
37
|
// Application validation schemas
|
|
38
|
+
// docker-compose applications can specify dockerComposePath in two ways:
|
|
39
|
+
// 1. File path (relative or absolute): "./docker-compose.yml" or "/path/to/compose.yml"
|
|
40
|
+
// 2. Base64-encoded content: "base64:SGVsbG8gd29ybGQK..."
|
|
41
|
+
// The agent will decode and write to working directory before use
|
|
38
42
|
exports.CreateApplicationSchema = zod_1.z.object({
|
|
39
43
|
name: zod_1.z.string().min(1, 'Name is required').max(100, 'Name must be 100 characters or less'),
|
|
40
44
|
description: zod_1.z.string().max(500).optional(),
|
|
@@ -48,7 +52,9 @@ exports.CreateApplicationSchema = zod_1.z.object({
|
|
|
48
52
|
env: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
49
53
|
logFile: zod_1.z.string().optional(),
|
|
50
54
|
healthCheckPath: zod_1.z.string().optional(),
|
|
51
|
-
dockerComposePath: zod_1.z.string()
|
|
55
|
+
dockerComposePath: zod_1.z.string()
|
|
56
|
+
.optional()
|
|
57
|
+
.describe('Path to docker-compose file OR base64-encoded content prefixed with "base64:"'),
|
|
52
58
|
systemdService: zod_1.z.string().optional(),
|
|
53
59
|
}),
|
|
54
60
|
hostnames: zod_1.z
|
|
@@ -60,6 +66,10 @@ exports.CreateApplicationSchema = zod_1.z.object({
|
|
|
60
66
|
gatewayIds: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
61
67
|
useManagedGateway: zod_1.z.boolean().optional(),
|
|
62
68
|
subtype: zod_1.z.enum(['local-preexisting', 'managed-docker', 'systemd', 'docker-compose', 'managed-process']),
|
|
69
|
+
authModes: zod_1.z.array(zod_1.z.enum(['none', 'org', 'api-key'])).optional(),
|
|
70
|
+
requireOrgAuth: zod_1.z.boolean().optional(), // deprecated, use authModes
|
|
71
|
+
allowedOrganizations: zod_1.z.array(zod_1.z.string()).optional(),
|
|
72
|
+
customHeaders: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
63
73
|
});
|
|
64
74
|
// IP address or CIDR block validation
|
|
65
75
|
const IPOrCIDRSchema = zod_1.z.string().regex(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\/(?:[0-9]|[1-2][0-9]|3[0-2]))?$/, 'Invalid IP address or CIDR block (e.g., 192.168.1.0/24 or 10.0.0.1)');
|
|
@@ -68,6 +78,9 @@ exports.UpdateApplicationSchema = zod_1.z.object({
|
|
|
68
78
|
description: zod_1.z.string().max(500).optional(),
|
|
69
79
|
environment: zod_1.z.enum(['development', 'staging', 'prod']).optional(),
|
|
70
80
|
allowedSourceIPs: zod_1.z.array(IPOrCIDRSchema).optional(),
|
|
81
|
+
authModes: zod_1.z.array(zod_1.z.enum(['none', 'org', 'api-key'])).optional(),
|
|
82
|
+
allowedOrganizations: zod_1.z.array(zod_1.z.string()).optional(),
|
|
83
|
+
customHeaders: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
71
84
|
});
|
|
72
85
|
exports.GetApplicationSchema = zod_1.z.object({
|
|
73
86
|
applicationId: zod_1.z.string().min(1, 'Application ID is required'),
|
|
@@ -72,5 +72,19 @@ export declare class PathResolver {
|
|
|
72
72
|
* @returns The appropriate agent config file path
|
|
73
73
|
*/
|
|
74
74
|
static resolveAgentConfigFilePath(installationType?: string): string;
|
|
75
|
+
/**
|
|
76
|
+
* Get the agent log file path.
|
|
77
|
+
*
|
|
78
|
+
* @param useSystemPath - If true, use system path; otherwise use user path
|
|
79
|
+
* @returns The agent.log file path
|
|
80
|
+
*/
|
|
81
|
+
static getAgentLogPath(useSystemPath?: boolean): string;
|
|
82
|
+
/**
|
|
83
|
+
* Resolve the agent log file path based on installation type.
|
|
84
|
+
*
|
|
85
|
+
* @param installationType - The agent installation type
|
|
86
|
+
* @returns The appropriate agent log file path
|
|
87
|
+
*/
|
|
88
|
+
static resolveAgentLogPath(installationType?: string): string;
|
|
75
89
|
}
|
|
76
90
|
//# sourceMappingURL=PathResolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathResolver.d.ts","sourceRoot":"","sources":["../../src/utils/PathResolver.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,qBAAa,YAAY;IACvB;;;;;OAKG;IACH,MAAM,CAAC,eAAe,IAAI,MAAM;IAkDhC;;;;;OAKG;IACH,MAAM,CAAC,eAAe,IAAI,MAAM;IAyBhC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AA0B,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM;IASpE;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,aAAa,GAAE,OAAe,GAAG,MAAM;IAK9D;;;;;OAKG;IACH,MAAM,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM;CAQ9D"}
|
|
@@ -230,6 +230,30 @@ class PathResolver {
|
|
|
230
230
|
installationType === 'podman';
|
|
231
231
|
return this.getAgentConfigFilePath(useSystemPath);
|
|
232
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Get the agent log file path.
|
|
235
|
+
*
|
|
236
|
+
* @param useSystemPath - If true, use system path; otherwise use user path
|
|
237
|
+
* @returns The agent.log file path
|
|
238
|
+
*/
|
|
239
|
+
static getAgentLogPath(useSystemPath = false) {
|
|
240
|
+
const agentConfigPath = this.getAgentConfigPath(useSystemPath);
|
|
241
|
+
return path.join(agentConfigPath, 'logs', 'agent.log');
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Resolve the agent log file path based on installation type.
|
|
245
|
+
*
|
|
246
|
+
* @param installationType - The agent installation type
|
|
247
|
+
* @returns The appropriate agent log file path
|
|
248
|
+
*/
|
|
249
|
+
static resolveAgentLogPath(installationType) {
|
|
250
|
+
const useSystemPath = installationType === 'systemd' ||
|
|
251
|
+
installationType === 'launchd' ||
|
|
252
|
+
installationType === 'windows-service' ||
|
|
253
|
+
installationType === 'docker' ||
|
|
254
|
+
installationType === 'podman';
|
|
255
|
+
return this.getAgentLogPath(useSystemPath);
|
|
256
|
+
}
|
|
233
257
|
}
|
|
234
258
|
exports.PathResolver = PathResolver;
|
|
235
259
|
//# sourceMappingURL=PathResolver.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgible-team/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "CLI tool for Edgible service",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"LICENSE"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"prebuild": "node scripts/copy-shared-deps.js",
|
|
18
|
+
"prebuild": "node scripts/generate-compose-constants.js && node scripts/copy-shared-deps.js",
|
|
19
19
|
"linux-build": "npm run prebuild && tsc && chmod +x dist/index.js",
|
|
20
20
|
"build": "tsc",
|
|
21
21
|
"postbuild": "node scripts/restore-symlinks.js && node scripts/copy-postinstall.js && node scripts/copy-recipes.js",
|
|
@@ -7,11 +7,36 @@ services:
|
|
|
7
7
|
ports:
|
|
8
8
|
- ${OPEN_WEBUI_PORT-3200}:8080
|
|
9
9
|
environment:
|
|
10
|
+
- 'ENABLE_OAUTH_SIGNUP=true'
|
|
11
|
+
- 'ENABLE_SIGNUP=true'
|
|
12
|
+
# - 'WEBUI_URL=open-webui.9fb839e9-ce2c-4abd-94d5-051e696cf1b7.edgible.com'
|
|
10
13
|
- 'OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://host.docker.internal:11434}'
|
|
11
|
-
- '
|
|
14
|
+
- 'OLLAMA_API_KEY=${OLLAMA_API_KEY:-}'
|
|
15
|
+
# - 'WEBUI_SECRET_KEY=123'
|
|
16
|
+
- 'WEBUI_AUTH_TRUSTED_EMAIL_HEADER=X-Auth-Email'
|
|
17
|
+
- 'WEBUI_AUTH_TRUSTED_NAME_HEADER=X-Auth-User'
|
|
18
|
+
# - 'WEBUI_AUTH=false'
|
|
19
|
+
# - 'WEBUI_SESSION_COOKIE_SAME_SITE=lax'
|
|
20
|
+
# - 'WEBUI_AUTH_COOKIE_SAME_SITE=lax'
|
|
21
|
+
# - 'WEBUI_SESSION_COOKIE_SECURE=false' # Set to false if using HTTP
|
|
22
|
+
# - 'WEBUI_AUTH_COOKIE_SECURE=false' # Set to false if using HTTP
|
|
12
23
|
extra_hosts:
|
|
13
24
|
- host.docker.internal:host-gateway
|
|
25
|
+
# Connect to DNS network to access DNS server
|
|
26
|
+
networks:
|
|
27
|
+
- edgible-dns-network
|
|
28
|
+
# Use Edgible DNS server for application hostname resolution
|
|
29
|
+
# The DNS server runs at 172.20.0.2 within the edgible-dns-network
|
|
30
|
+
# and resolves application hostnames to the host gateway (172.20.0.1)
|
|
31
|
+
dns:
|
|
32
|
+
- 172.20.0.2 # Edgible DNS server (resolves app hostnames)
|
|
33
|
+
- 8.8.8.8 # Fallback public DNS
|
|
14
34
|
restart: unless-stopped
|
|
15
35
|
|
|
16
36
|
volumes:
|
|
17
37
|
open-webui: {}
|
|
38
|
+
|
|
39
|
+
# Define the DNS network as external (created by agent)
|
|
40
|
+
networks:
|
|
41
|
+
edgible-dns-network:
|
|
42
|
+
external: true
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface DetectedTool {
|
|
2
|
-
name: string;
|
|
3
|
-
version?: string;
|
|
4
|
-
available: boolean;
|
|
5
|
-
command: string;
|
|
6
|
-
category: 'container' | 'vm' | 'orchestration' | 'cloud' | 'other';
|
|
7
|
-
description: string;
|
|
8
|
-
}
|
|
9
|
-
export declare class ToolDetector {
|
|
10
|
-
private static tools;
|
|
11
|
-
static detectTools(): Promise<DetectedTool[]>;
|
|
12
|
-
private static getToolVersion;
|
|
13
|
-
static displayDetectedTools(tools: DetectedTool[]): void;
|
|
14
|
-
static getToolSummary(tools: DetectedTool[]): string;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/detection/tools.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,WAAW,GAAG,IAAI,GAAG,eAAe,GAAG,OAAO,GAAG,OAAO,CAAC;IACnE,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAkLlB;WAEkB,WAAW,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IA8B1D,OAAO,CAAC,MAAM,CAAC,cAAc;WA6Df,oBAAoB,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,IAAI;WAqCjD,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM;CAM5D"}
|
package/dist/detection/tools.js
DELETED
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ToolDetector = void 0;
|
|
7
|
-
const child_process_1 = require("child_process");
|
|
8
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
-
class ToolDetector {
|
|
10
|
-
static async detectTools() {
|
|
11
|
-
const detectedTools = [];
|
|
12
|
-
for (const tool of this.tools) {
|
|
13
|
-
try {
|
|
14
|
-
const version = this.getToolVersion(tool.command);
|
|
15
|
-
if (version !== null) {
|
|
16
|
-
detectedTools.push({
|
|
17
|
-
...tool,
|
|
18
|
-
available: true,
|
|
19
|
-
version: version
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
detectedTools.push({
|
|
24
|
-
...tool,
|
|
25
|
-
available: false
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
// Tool not available
|
|
31
|
-
detectedTools.push({
|
|
32
|
-
...tool,
|
|
33
|
-
available: false
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return detectedTools;
|
|
38
|
-
}
|
|
39
|
-
static getToolVersion(command) {
|
|
40
|
-
try {
|
|
41
|
-
// Special handling for different tools
|
|
42
|
-
if (command === 'docker') {
|
|
43
|
-
const output = (0, child_process_1.execSync)('docker --version', { encoding: 'utf8', timeout: 5000 });
|
|
44
|
-
return output.trim().replace('Docker version ', '');
|
|
45
|
-
}
|
|
46
|
-
if (command === 'kubectl') {
|
|
47
|
-
const output = (0, child_process_1.execSync)('kubectl version --client', { encoding: 'utf8', timeout: 5000 });
|
|
48
|
-
const lines = output.split('\n');
|
|
49
|
-
const versionLine = lines.find(line => line.includes('Client Version:'));
|
|
50
|
-
return versionLine ? versionLine.trim().replace('Client Version: ', '') : 'Unknown';
|
|
51
|
-
}
|
|
52
|
-
if (command === 'aws') {
|
|
53
|
-
const output = (0, child_process_1.execSync)('aws --version', { encoding: 'utf8', timeout: 5000 });
|
|
54
|
-
return output.trim().replace('aws-cli/', '');
|
|
55
|
-
}
|
|
56
|
-
if (command === 'az') {
|
|
57
|
-
const output = (0, child_process_1.execSync)('az --version', { encoding: 'utf8', timeout: 5000 });
|
|
58
|
-
const lines = output.split('\n');
|
|
59
|
-
const versionLine = lines.find(line => line.includes('azure-cli'));
|
|
60
|
-
return versionLine ? versionLine.trim().replace('azure-cli ', '') : 'Unknown';
|
|
61
|
-
}
|
|
62
|
-
if (command === 'gcloud') {
|
|
63
|
-
const output = (0, child_process_1.execSync)('gcloud --version', { encoding: 'utf8', timeout: 5000 });
|
|
64
|
-
const lines = output.split('\n');
|
|
65
|
-
const versionLine = lines.find(line => line.includes('Google Cloud SDK'));
|
|
66
|
-
return versionLine ? versionLine.trim().replace('Google Cloud SDK ', '') : 'Unknown';
|
|
67
|
-
}
|
|
68
|
-
if (command === 'terraform') {
|
|
69
|
-
const output = (0, child_process_1.execSync)('terraform --version', { encoding: 'utf8', timeout: 5000 });
|
|
70
|
-
const lines = output.split('\n');
|
|
71
|
-
const versionLine = lines.find(line => line.includes('Terraform v'));
|
|
72
|
-
return versionLine ? versionLine.trim().replace('Terraform v', '') : 'Unknown';
|
|
73
|
-
}
|
|
74
|
-
if (command === 'powershell') {
|
|
75
|
-
// Check if we're on Windows and PowerShell is available
|
|
76
|
-
if (process.platform === 'win32') {
|
|
77
|
-
const output = (0, child_process_1.execSync)('powershell -Command "$PSVersionTable.PSVersion"', { encoding: 'utf8', timeout: 5000 });
|
|
78
|
-
return output.trim();
|
|
79
|
-
}
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
// Generic version detection
|
|
83
|
-
const output = (0, child_process_1.execSync)(`${command} --version`, { encoding: 'utf8', timeout: 5000 });
|
|
84
|
-
const lines = output.split('\n');
|
|
85
|
-
const versionLine = lines[0];
|
|
86
|
-
return versionLine ? versionLine.trim() : 'Unknown';
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
static displayDetectedTools(tools) {
|
|
93
|
-
const availableTools = tools.filter(tool => tool.available);
|
|
94
|
-
const unavailableTools = tools.filter(tool => !tool.available);
|
|
95
|
-
if (availableTools.length === 0) {
|
|
96
|
-
console.log(chalk_1.default.yellow('⚠ No container/VM/workload management tools detected'));
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
console.log(chalk_1.default.blue.bold('\n🔧 Detected Infrastructure Tools:\n'));
|
|
100
|
-
// Group tools by category
|
|
101
|
-
const categories = {
|
|
102
|
-
container: availableTools.filter(tool => tool.category === 'container'),
|
|
103
|
-
vm: availableTools.filter(tool => tool.category === 'vm'),
|
|
104
|
-
orchestration: availableTools.filter(tool => tool.category === 'orchestration'),
|
|
105
|
-
cloud: availableTools.filter(tool => tool.category === 'cloud'),
|
|
106
|
-
other: availableTools.filter(tool => tool.category === 'other')
|
|
107
|
-
};
|
|
108
|
-
Object.entries(categories).forEach(([category, categoryTools]) => {
|
|
109
|
-
if (categoryTools.length > 0) {
|
|
110
|
-
console.log(chalk_1.default.cyan.bold(`📦 ${category.charAt(0).toUpperCase() + category.slice(1)}:`));
|
|
111
|
-
categoryTools.forEach(tool => {
|
|
112
|
-
const versionText = tool.version ? ` (${tool.version})` : '';
|
|
113
|
-
console.log(chalk_1.default.green(` ✓ ${tool.name}${versionText}`));
|
|
114
|
-
console.log(chalk_1.default.gray(` ${tool.description}`));
|
|
115
|
-
});
|
|
116
|
-
console.log('');
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
if (unavailableTools.length > 0) {
|
|
120
|
-
console.log(chalk_1.default.gray(`💡 ${unavailableTools.length} additional tools not detected (${unavailableTools.map(t => t.name).join(', ')})`));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
static getToolSummary(tools) {
|
|
124
|
-
const availableTools = tools.filter(tool => tool.available);
|
|
125
|
-
const categories = new Set(availableTools.map(tool => tool.category));
|
|
126
|
-
return `${availableTools.length} tools detected across ${categories.size} categories`;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.ToolDetector = ToolDetector;
|
|
130
|
-
ToolDetector.tools = [
|
|
131
|
-
// Container runtimes
|
|
132
|
-
{
|
|
133
|
-
name: 'Docker',
|
|
134
|
-
command: 'docker',
|
|
135
|
-
category: 'container',
|
|
136
|
-
description: 'Container runtime and platform',
|
|
137
|
-
available: false
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
name: 'Podman',
|
|
141
|
-
command: 'podman',
|
|
142
|
-
category: 'container',
|
|
143
|
-
description: 'Daemonless container engine',
|
|
144
|
-
available: false
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
name: 'Containerd',
|
|
148
|
-
command: 'ctr',
|
|
149
|
-
category: 'container',
|
|
150
|
-
description: 'Container runtime',
|
|
151
|
-
available: false
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
name: 'LXC',
|
|
155
|
-
command: 'lxc',
|
|
156
|
-
category: 'container',
|
|
157
|
-
description: 'Linux containers',
|
|
158
|
-
available: false
|
|
159
|
-
},
|
|
160
|
-
// VM Management
|
|
161
|
-
{
|
|
162
|
-
name: 'VirtualBox',
|
|
163
|
-
command: 'vboxmanage',
|
|
164
|
-
category: 'vm',
|
|
165
|
-
description: 'Virtual machine management',
|
|
166
|
-
available: false
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
name: 'VMware',
|
|
170
|
-
command: 'vmrun',
|
|
171
|
-
category: 'vm',
|
|
172
|
-
description: 'VMware virtualization',
|
|
173
|
-
available: false
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
name: 'QEMU',
|
|
177
|
-
command: 'qemu-system-x86_64',
|
|
178
|
-
category: 'vm',
|
|
179
|
-
description: 'Machine emulator and virtualizer',
|
|
180
|
-
available: false
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
name: 'KVM',
|
|
184
|
-
command: 'kvm',
|
|
185
|
-
category: 'vm',
|
|
186
|
-
description: 'Kernel-based Virtual Machine',
|
|
187
|
-
available: false
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
name: 'Hyper-V',
|
|
191
|
-
command: 'powershell',
|
|
192
|
-
category: 'vm',
|
|
193
|
-
description: 'Windows virtualization platform',
|
|
194
|
-
available: false
|
|
195
|
-
},
|
|
196
|
-
// Orchestration
|
|
197
|
-
{
|
|
198
|
-
name: 'Kubernetes',
|
|
199
|
-
command: 'kubectl',
|
|
200
|
-
category: 'orchestration',
|
|
201
|
-
description: 'Container orchestration platform',
|
|
202
|
-
available: false
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
name: 'Docker Compose',
|
|
206
|
-
command: 'docker-compose',
|
|
207
|
-
category: 'orchestration',
|
|
208
|
-
description: 'Multi-container Docker applications',
|
|
209
|
-
available: false
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
name: 'Docker Swarm',
|
|
213
|
-
command: 'docker',
|
|
214
|
-
category: 'orchestration',
|
|
215
|
-
description: 'Docker native clustering',
|
|
216
|
-
available: false
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
name: 'Nomad',
|
|
220
|
-
command: 'nomad',
|
|
221
|
-
category: 'orchestration',
|
|
222
|
-
description: 'Workload orchestrator',
|
|
223
|
-
available: false
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: 'Mesos',
|
|
227
|
-
command: 'mesos-master',
|
|
228
|
-
category: 'orchestration',
|
|
229
|
-
description: 'Distributed systems kernel',
|
|
230
|
-
available: false
|
|
231
|
-
},
|
|
232
|
-
// Cloud CLI Tools
|
|
233
|
-
{
|
|
234
|
-
name: 'AWS CLI',
|
|
235
|
-
command: 'aws',
|
|
236
|
-
category: 'cloud',
|
|
237
|
-
description: 'Amazon Web Services CLI',
|
|
238
|
-
available: false
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
name: 'Azure CLI',
|
|
242
|
-
command: 'az',
|
|
243
|
-
category: 'cloud',
|
|
244
|
-
description: 'Microsoft Azure CLI',
|
|
245
|
-
available: false
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
name: 'Google Cloud CLI',
|
|
249
|
-
command: 'gcloud',
|
|
250
|
-
category: 'cloud',
|
|
251
|
-
description: 'Google Cloud Platform CLI',
|
|
252
|
-
available: false
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
name: 'DigitalOcean CLI',
|
|
256
|
-
command: 'doctl',
|
|
257
|
-
category: 'cloud',
|
|
258
|
-
description: 'DigitalOcean CLI',
|
|
259
|
-
available: false
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
name: 'Terraform',
|
|
263
|
-
command: 'terraform',
|
|
264
|
-
category: 'cloud',
|
|
265
|
-
description: 'Infrastructure as Code',
|
|
266
|
-
available: false
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
name: 'Ansible',
|
|
270
|
-
command: 'ansible',
|
|
271
|
-
category: 'cloud',
|
|
272
|
-
description: 'Configuration management',
|
|
273
|
-
available: false
|
|
274
|
-
},
|
|
275
|
-
// Other Infrastructure Tools
|
|
276
|
-
{
|
|
277
|
-
name: 'Vagrant',
|
|
278
|
-
command: 'vagrant',
|
|
279
|
-
category: 'other',
|
|
280
|
-
description: 'Development environment management',
|
|
281
|
-
available: false
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
name: 'Packer',
|
|
285
|
-
command: 'packer',
|
|
286
|
-
category: 'other',
|
|
287
|
-
description: 'Machine image creation',
|
|
288
|
-
available: false
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
name: 'Helm',
|
|
292
|
-
command: 'helm',
|
|
293
|
-
category: 'other',
|
|
294
|
-
description: 'Kubernetes package manager',
|
|
295
|
-
available: false
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
name: 'Istio',
|
|
299
|
-
command: 'istioctl',
|
|
300
|
-
category: 'other',
|
|
301
|
-
description: 'Service mesh platform',
|
|
302
|
-
available: false
|
|
303
|
-
}
|
|
304
|
-
];
|
|
305
|
-
//# sourceMappingURL=tools.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
OLLAMA_BASE_URL="https://ollama-api.ded8dbdc-54d1-4997-aa8d-cde1ee5cbf39.edgible.com"
|