@edgible-team/cli 1.2.15 → 1.2.17
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/README.md +5 -3
- package/dist/client/api-client.d.ts +13 -1
- package/dist/client/api-client.d.ts.map +1 -1
- package/dist/client/api-client.js +19 -0
- package/dist/commands/agent/install.d.ts +2 -1
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +24 -7
- package/dist/commands/agent/start.d.ts +5 -1
- package/dist/commands/agent/start.d.ts.map +1 -1
- package/dist/commands/agent/start.js +19 -280
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +14 -7
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +3 -2
- package/dist/commands/ai/setup.d.ts +1 -1
- package/dist/commands/ai/setup.d.ts.map +1 -1
- package/dist/commands/ai.js +1 -1
- package/dist/commands/application/create-docker-compose.d.ts +3 -1
- package/dist/commands/application/create-docker-compose.d.ts.map +1 -1
- package/dist/commands/application/create-docker-compose.js +25 -69
- package/dist/commands/application/create-existing.d.ts +2 -2
- package/dist/commands/application/create-existing.d.ts.map +1 -1
- package/dist/commands/application/create-existing.js +27 -132
- package/dist/commands/application/create-managed-process.d.ts +3 -1
- package/dist/commands/application/create-managed-process.d.ts.map +1 -1
- package/dist/commands/application/create-managed-process.js +31 -75
- package/dist/commands/application/delete.d.ts +2 -1
- package/dist/commands/application/delete.d.ts.map +1 -1
- package/dist/commands/application/delete.js +19 -5
- package/dist/commands/application/update.d.ts +3 -0
- package/dist/commands/application/update.d.ts.map +1 -1
- package/dist/commands/application/update.js +45 -1
- package/dist/commands/application.d.ts.map +1 -1
- package/dist/commands/application.js +33 -19
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +44 -0
- package/dist/commands/debug.js +1 -1
- package/dist/commands/device/application-health.d.ts +7 -0
- package/dist/commands/device/application-health.d.ts.map +1 -0
- package/dist/commands/device/application-health.js +103 -0
- package/dist/commands/device/delete.d.ts +7 -0
- package/dist/commands/device/delete.d.ts.map +1 -0
- package/dist/commands/device/delete.js +69 -0
- package/dist/commands/device/health.d.ts +7 -0
- package/dist/commands/device/health.d.ts.map +1 -0
- package/dist/commands/device/health.js +78 -0
- package/dist/commands/device/list.d.ts +5 -0
- package/dist/commands/device/list.d.ts.map +1 -0
- package/dist/commands/device/list.js +46 -0
- package/dist/commands/device/telemetry.d.ts +8 -0
- package/dist/commands/device/telemetry.d.ts.map +1 -0
- package/dist/commands/device/telemetry.js +59 -0
- package/dist/commands/device.d.ts +6 -0
- package/dist/commands/device.d.ts.map +1 -0
- package/dist/commands/device.js +86 -0
- package/dist/commands/stack/deploy.d.ts +3 -1
- package/dist/commands/stack/deploy.d.ts.map +1 -1
- package/dist/commands/stack/deploy.js +5 -2
- package/dist/commands/stack/diff.d.ts +1 -1
- package/dist/commands/stack/diff.d.ts.map +1 -1
- package/dist/commands/stack/diff.js +4 -2
- package/dist/commands/stack/status.d.ts +1 -1
- package/dist/commands/stack/status.d.ts.map +1 -1
- package/dist/commands/stack/status.js +4 -2
- package/dist/commands/stack/teardown.d.ts +3 -1
- package/dist/commands/stack/teardown.d.ts.map +1 -1
- package/dist/commands/stack/teardown.js +5 -2
- package/dist/commands/stack/validate.d.ts +1 -1
- package/dist/commands/stack/validate.d.ts.map +1 -1
- package/dist/commands/stack/validate.js +4 -2
- package/dist/commands/stack.d.ts.map +1 -1
- package/dist/commands/stack.js +10 -5
- package/dist/commands/utils/auth-prompt.d.ts +25 -0
- package/dist/commands/utils/auth-prompt.d.ts.map +1 -0
- package/dist/commands/utils/auth-prompt.js +115 -0
- package/dist/commands/utils/device-prompt.d.ts +18 -0
- package/dist/commands/utils/device-prompt.d.ts.map +1 -0
- package/dist/commands/utils/device-prompt.js +58 -0
- package/dist/commands/utils/output-formatter.d.ts +13 -0
- package/dist/commands/utils/output-formatter.d.ts.map +1 -1
- package/dist/commands/utils/output-formatter.js +21 -0
- package/dist/index.js +2 -0
- package/dist/services/LocalAgentManager.d.ts +2 -1
- package/dist/services/LocalAgentManager.d.ts.map +1 -1
- package/dist/services/LocalAgentManager.js +6 -4
- package/dist/services/application/ApplicationService.d.ts +19 -0
- package/dist/services/application/ApplicationService.d.ts.map +1 -1
- package/dist/services/application/ApplicationService.js +14 -1
- package/dist/services/device/DeviceService.d.ts +62 -0
- package/dist/services/device/DeviceService.d.ts.map +1 -0
- package/dist/services/device/DeviceService.js +235 -0
- package/dist/services/edgible.d.ts +3 -1
- package/dist/services/edgible.d.ts.map +1 -1
- package/dist/services/edgible.js +5 -4
- package/dist/services/instances.d.ts +4 -1
- package/dist/services/instances.d.ts.map +1 -1
- package/dist/services/instances.js +8 -4
- package/dist/types/AgentConfig.d.ts +26 -0
- package/dist/types/AgentConfig.d.ts.map +1 -1
- package/dist/types/ApiRequests.d.ts +5 -1
- package/dist/types/ApiRequests.d.ts.map +1 -1
- package/dist/types/ApiResponses.d.ts +5 -0
- package/dist/types/ApiResponses.d.ts.map +1 -1
- package/dist/types/JobTypes.d.ts +103 -0
- package/dist/types/JobTypes.d.ts.map +1 -0
- package/dist/types/JobTypes.js +80 -0
- package/dist/types/WebSocketMessages.d.ts +89 -0
- package/dist/types/WebSocketMessages.d.ts.map +1 -0
- package/dist/types/WebSocketMessages.js +5 -0
- package/dist/types/backendJobs.d.ts +102 -0
- package/dist/types/backendJobs.d.ts.map +1 -0
- package/dist/types/backendJobs.js +5 -0
- package/dist/types/models/ApplicationData.d.ts +1 -1
- package/dist/types/models/ApplicationData.d.ts.map +1 -1
- package/dist/types/models/DeviceData.d.ts +4 -0
- package/dist/types/models/DeviceData.d.ts.map +1 -1
- package/dist/types/validation/schemas.d.ts +3 -3
- package/dist/types/validation/schemas.js +1 -1
- package/dist/utils/stack-file.d.ts +11 -0
- package/dist/utils/stack-file.d.ts.map +1 -0
- package/dist/utils/stack-file.js +66 -0
- package/package.json +1 -1
- package/dist/commands/agent/agent-handlers.d.ts +0 -45
- package/dist/commands/agent/agent-handlers.d.ts.map +0 -1
- package/dist/commands/agent/agent-handlers.js +0 -1159
- package/dist/commands/application/api-keys.d.ts +0 -3
- package/dist/commands/application/api-keys.d.ts.map +0 -1
- package/dist/commands/application/api-keys.js +0 -227
- package/dist/commands/application/create-compose.d.ts +0 -3
- package/dist/commands/application/create-compose.d.ts.map +0 -1
- package/dist/commands/application/create-compose.js +0 -381
- package/dist/commands/application/create-interactive.d.ts +0 -3
- package/dist/commands/application/create-interactive.d.ts.map +0 -1
- package/dist/commands/application/create-interactive.js +0 -326
- package/dist/commands/application/create-workload.d.ts +0 -5
- package/dist/commands/application/create-workload.d.ts.map +0 -1
- package/dist/commands/application/create-workload.js +0 -48
- package/dist/commands/application/short-codes.d.ts +0 -3
- package/dist/commands/application/short-codes.d.ts.map +0 -1
- package/dist/commands/application/short-codes.js +0 -226
- package/dist/commands/application/toggle.d.ts +0 -2
- package/dist/commands/application/toggle.d.ts.map +0 -1
- package/dist/commands/application/toggle.js +0 -78
- package/dist/commands/examples/migrated-command-example.d.ts +0 -31
- package/dist/commands/examples/migrated-command-example.d.ts.map +0 -1
- package/dist/commands/examples/migrated-command-example.js +0 -180
- package/dist/commands/managedGateway/create.d.ts +0 -6
- package/dist/commands/managedGateway/create.d.ts.map +0 -1
- package/dist/commands/managedGateway/create.js +0 -50
- package/dist/commands/managedGateway/delete.d.ts +0 -5
- package/dist/commands/managedGateway/delete.d.ts.map +0 -1
- package/dist/commands/managedGateway/delete.js +0 -57
- package/dist/commands/managedGateway/get.d.ts +0 -4
- package/dist/commands/managedGateway/get.d.ts.map +0 -1
- package/dist/commands/managedGateway/get.js +0 -71
- package/dist/commands/managedGateway/haproxy-stats.d.ts +0 -6
- package/dist/commands/managedGateway/haproxy-stats.d.ts.map +0 -1
- package/dist/commands/managedGateway/haproxy-stats.js +0 -131
- package/dist/commands/managedGateway/list.d.ts +0 -4
- package/dist/commands/managedGateway/list.d.ts.map +0 -1
- package/dist/commands/managedGateway/list.js +0 -50
- package/dist/commands/managedGateway/logs.d.ts +0 -10
- package/dist/commands/managedGateway/logs.d.ts.map +0 -1
- package/dist/commands/managedGateway/logs.js +0 -100
- package/dist/commands/managedGateway/reboot.d.ts +0 -5
- package/dist/commands/managedGateway/reboot.d.ts.map +0 -1
- package/dist/commands/managedGateway/reboot.js +0 -95
- package/dist/commands/managedGateway/resync.d.ts +0 -10
- package/dist/commands/managedGateway/resync.d.ts.map +0 -1
- package/dist/commands/managedGateway/resync.js +0 -69
- package/dist/commands/managedGateway/ssh.d.ts +0 -4
- package/dist/commands/managedGateway/ssh.d.ts.map +0 -1
- package/dist/commands/managedGateway/ssh.js +0 -130
- package/dist/commands/managedGateway/wipe-logs.d.ts +0 -4
- package/dist/commands/managedGateway/wipe-logs.d.ts.map +0 -1
- package/dist/commands/managedGateway/wipe-logs.js +0 -67
- package/dist/commands/managedGateway/wireguard.d.ts +0 -4
- package/dist/commands/managedGateway/wireguard.d.ts.map +0 -1
- package/dist/commands/managedGateway/wireguard.js +0 -68
- package/dist/di/bindings.d.ts +0 -15
- package/dist/di/bindings.d.ts.map +0 -1
- package/dist/di/bindings.js +0 -99
- package/dist/di/container.d.ts +0 -44
- package/dist/di/container.d.ts.map +0 -1
- package/dist/di/container.js +0 -88
- package/dist/di/types.d.ts +0 -23
- package/dist/di/types.d.ts.map +0 -1
- package/dist/di/types.js +0 -32
- package/dist/repositories/config-repository.d.ts +0 -46
- package/dist/repositories/config-repository.d.ts.map +0 -1
- package/dist/repositories/config-repository.js +0 -62
- package/dist/repositories/gateway-repository.d.ts +0 -37
- package/dist/repositories/gateway-repository.d.ts.map +0 -1
- package/dist/repositories/gateway-repository.js +0 -35
|
@@ -0,0 +1,69 @@
|
|
|
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.handleDeviceDelete = handleDeviceDelete;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const instances_1 = require("../../services/instances");
|
|
10
|
+
const config_validator_1 = require("../utils/config-validator");
|
|
11
|
+
const device_prompt_1 = require("../utils/device-prompt");
|
|
12
|
+
async function handleDeviceDelete(options) {
|
|
13
|
+
(0, config_validator_1.validateConfig)(instances_1.configManager, {
|
|
14
|
+
requireAuth: true,
|
|
15
|
+
requireOrganization: true,
|
|
16
|
+
});
|
|
17
|
+
const isInteractive = options.nonInteractive !== true;
|
|
18
|
+
let deviceId = null;
|
|
19
|
+
// If name is provided, resolve it to a device ID
|
|
20
|
+
if (options.name && !options.id) {
|
|
21
|
+
const { devices } = await instances_1.deviceService.listDevices();
|
|
22
|
+
const device = devices.find((d) => d.name === options.name);
|
|
23
|
+
if (!device) {
|
|
24
|
+
throw new Error(`Device with name "${options.name}" not found. Use "edgible device list" to see available devices.`);
|
|
25
|
+
}
|
|
26
|
+
deviceId = device.id;
|
|
27
|
+
instances_1.logger.debug('Resolved device name to ID', { name: options.name, deviceId });
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// Use ID if provided, or prompt if interactive
|
|
31
|
+
deviceId =
|
|
32
|
+
isInteractive
|
|
33
|
+
? await (0, device_prompt_1.getDeviceId)(instances_1.deviceService, options.id, {
|
|
34
|
+
message: 'Select device to delete:',
|
|
35
|
+
required: true,
|
|
36
|
+
})
|
|
37
|
+
: options.id ?? null;
|
|
38
|
+
}
|
|
39
|
+
if (!deviceId) {
|
|
40
|
+
throw new Error('--id or --name is required in non-interactive mode. Usage: edgible device delete --id <device-id> or --name <device-name>');
|
|
41
|
+
}
|
|
42
|
+
instances_1.logger.debug('Deleting device', { deviceId });
|
|
43
|
+
const currentDeviceId = instances_1.configManager.getConfig().deviceId;
|
|
44
|
+
if (currentDeviceId === deviceId) {
|
|
45
|
+
console.log(chalk_1.default.yellow('⚠ You are deleting the device you are currently logged in as.'));
|
|
46
|
+
console.log(chalk_1.default.gray('Local device credentials will be cleared after deletion.'));
|
|
47
|
+
}
|
|
48
|
+
if (!options.force) {
|
|
49
|
+
const { devices } = await instances_1.deviceService.listDevices();
|
|
50
|
+
const device = devices.find((d) => d.id === deviceId);
|
|
51
|
+
const displayName = device ? `${device.name} (${deviceId})` : deviceId;
|
|
52
|
+
const { confirm } = await inquirer_1.default.prompt([
|
|
53
|
+
{
|
|
54
|
+
type: 'confirm',
|
|
55
|
+
name: 'confirm',
|
|
56
|
+
message: `Are you sure you want to delete device "${displayName}"?`,
|
|
57
|
+
default: false,
|
|
58
|
+
},
|
|
59
|
+
]);
|
|
60
|
+
if (!confirm) {
|
|
61
|
+
instances_1.logger.info('Device deletion cancelled');
|
|
62
|
+
console.log(chalk_1.default.gray('Deletion cancelled'));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
await instances_1.deviceService.deleteDevice(deviceId);
|
|
67
|
+
console.log(chalk_1.default.green('✓ Device deleted successfully'));
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../src/commands/device/health.ts"],"names":[],"mappings":"AAwCA,wBAAsB,kBAAkB,CAAC,OAAO,EAAE;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CAwChB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
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.handleDeviceHealth = handleDeviceHealth;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const instances_1 = require("../../services/instances");
|
|
9
|
+
const config_validator_1 = require("../utils/config-validator");
|
|
10
|
+
const device_prompt_1 = require("../utils/device-prompt");
|
|
11
|
+
function formatUptime(ms) {
|
|
12
|
+
if (ms < 0 || !Number.isFinite(ms))
|
|
13
|
+
return '—';
|
|
14
|
+
const sec = Math.floor(ms / 1000);
|
|
15
|
+
if (sec < 60)
|
|
16
|
+
return `${sec}s`;
|
|
17
|
+
const min = Math.floor(sec / 60);
|
|
18
|
+
if (min < 60)
|
|
19
|
+
return `${min}m`;
|
|
20
|
+
const hr = Math.floor(min / 60);
|
|
21
|
+
if (hr < 24)
|
|
22
|
+
return `${hr}h ${min % 60}m`;
|
|
23
|
+
const d = Math.floor(hr / 24);
|
|
24
|
+
return `${d}d ${hr % 24}h`;
|
|
25
|
+
}
|
|
26
|
+
function formatPercent(value) {
|
|
27
|
+
if (typeof value !== 'number' || !Number.isFinite(value))
|
|
28
|
+
return '—';
|
|
29
|
+
return `${Math.round(value)}%`;
|
|
30
|
+
}
|
|
31
|
+
function prettyPrintHealth(deviceName, deviceId, health) {
|
|
32
|
+
const cpu = formatPercent(health.cpuUsage);
|
|
33
|
+
const mem = formatPercent(health.memoryUsage);
|
|
34
|
+
const disk = formatPercent(health.diskUsage);
|
|
35
|
+
const uptime = formatUptime(health.uptime);
|
|
36
|
+
const ts = health.timestamp ? new Date(health.timestamp).toLocaleString() : '—';
|
|
37
|
+
console.log(chalk_1.default.bold(`Device: ${deviceName} (${deviceId})`));
|
|
38
|
+
console.log(chalk_1.default.gray('—'));
|
|
39
|
+
console.log(chalk_1.default.white(` CPU: ${cpu}`));
|
|
40
|
+
console.log(chalk_1.default.white(` Memory: ${mem}`));
|
|
41
|
+
console.log(chalk_1.default.white(` Disk: ${disk}`));
|
|
42
|
+
console.log(chalk_1.default.white(` Uptime: ${uptime}`));
|
|
43
|
+
console.log(chalk_1.default.gray(` At: ${ts}`));
|
|
44
|
+
console.log(chalk_1.default.green('✓ Health check OK'));
|
|
45
|
+
}
|
|
46
|
+
async function handleDeviceHealth(options) {
|
|
47
|
+
(0, config_validator_1.validateConfig)(instances_1.configManager, {
|
|
48
|
+
requireAuth: true,
|
|
49
|
+
requireOrganization: true,
|
|
50
|
+
});
|
|
51
|
+
const isInteractive = options.nonInteractive !== true;
|
|
52
|
+
let deviceId = await instances_1.deviceService.resolveDeviceId({
|
|
53
|
+
deviceId: options.deviceId,
|
|
54
|
+
name: options.name,
|
|
55
|
+
interactive: isInteractive,
|
|
56
|
+
message: 'Select device to check health:',
|
|
57
|
+
});
|
|
58
|
+
if (!deviceId && isInteractive) {
|
|
59
|
+
deviceId = await (0, device_prompt_1.getDeviceId)(instances_1.deviceService, undefined, {
|
|
60
|
+
message: 'Select device to check health:',
|
|
61
|
+
required: true,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (!deviceId) {
|
|
65
|
+
throw new Error('Device is required. Use --device-id <id>, --name <name>, or run interactively. Example: edgible device health --name my-laptop');
|
|
66
|
+
}
|
|
67
|
+
const device = await instances_1.deviceService.getDevice(deviceId);
|
|
68
|
+
if (!device) {
|
|
69
|
+
throw new Error(`Device not found: ${deviceId}`);
|
|
70
|
+
}
|
|
71
|
+
const health = await instances_1.deviceService.getDeviceHealth(deviceId);
|
|
72
|
+
if (options.json) {
|
|
73
|
+
console.log(JSON.stringify(health, null, 2));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
prettyPrintHealth(device.name ?? deviceId, deviceId, health);
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/device/list.ts"],"names":[],"mappings":"AAMA,wBAAsB,gBAAgB,CAAC,OAAO,EAAE;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDhB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.handleDeviceList = handleDeviceList;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const instances_1 = require("../../services/instances");
|
|
9
|
+
const config_validator_1 = require("../utils/config-validator");
|
|
10
|
+
const output_formatter_1 = require("../utils/output-formatter");
|
|
11
|
+
async function handleDeviceList(options) {
|
|
12
|
+
(0, config_validator_1.validateConfig)(instances_1.configManager, {
|
|
13
|
+
requireAuth: true,
|
|
14
|
+
requireOrganization: true,
|
|
15
|
+
});
|
|
16
|
+
instances_1.logger.debug('Listing devices');
|
|
17
|
+
const listOptions = options.type && (options.type === 'serving' || options.type === 'gateway')
|
|
18
|
+
? { type: options.type }
|
|
19
|
+
: undefined;
|
|
20
|
+
const { devices } = await instances_1.deviceService.listDevices(listOptions);
|
|
21
|
+
if (devices.length === 0) {
|
|
22
|
+
console.log(chalk_1.default.yellow('⚠ No devices in organization'));
|
|
23
|
+
if (options.type) {
|
|
24
|
+
console.log(chalk_1.default.gray(`No devices with type "${options.type}"`));
|
|
25
|
+
}
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (options.json) {
|
|
29
|
+
console.log(JSON.stringify({
|
|
30
|
+
devices: devices.map((d) => ({
|
|
31
|
+
id: d.id,
|
|
32
|
+
name: d.name,
|
|
33
|
+
type: d.type,
|
|
34
|
+
status: d.status,
|
|
35
|
+
organizationId: d.organizationId,
|
|
36
|
+
createdAt: d.createdAt,
|
|
37
|
+
updatedAt: d.updatedAt,
|
|
38
|
+
lastSeen: d.lastSeen,
|
|
39
|
+
description: d.description,
|
|
40
|
+
})),
|
|
41
|
+
}, null, 2));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
console.log((0, output_formatter_1.formatList)(devices, (device, index) => `${index + 1}. ${(0, output_formatter_1.formatDevice)(device)}`, '📱 Devices:', 'No devices in organization'));
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../src/commands/device/telemetry.ts"],"names":[],"mappings":"AAOA,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CAyDhB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.handleDeviceTelemetry = handleDeviceTelemetry;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const instances_1 = require("../../services/instances");
|
|
9
|
+
const config_validator_1 = require("../utils/config-validator");
|
|
10
|
+
const device_prompt_1 = require("../utils/device-prompt");
|
|
11
|
+
const DEFAULT_ENDPOINT = '/health/device';
|
|
12
|
+
async function handleDeviceTelemetry(options) {
|
|
13
|
+
// When using --url we only need auth (for the token). When using device-id we need org too.
|
|
14
|
+
const useUrl = Boolean(options.url?.trim());
|
|
15
|
+
(0, config_validator_1.validateConfig)(instances_1.configManager, {
|
|
16
|
+
requireAuth: true,
|
|
17
|
+
requireOrganization: !useUrl,
|
|
18
|
+
});
|
|
19
|
+
const isInteractive = options.nonInteractive !== true;
|
|
20
|
+
let telemetryBaseUrl;
|
|
21
|
+
if (useUrl) {
|
|
22
|
+
telemetryBaseUrl = options.url.trim();
|
|
23
|
+
if (!telemetryBaseUrl.startsWith('http://') && !telemetryBaseUrl.startsWith('https://')) {
|
|
24
|
+
telemetryBaseUrl = `https://${telemetryBaseUrl}`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
const deviceId = isInteractive
|
|
29
|
+
? await (0, device_prompt_1.getDeviceId)(instances_1.deviceService, options.deviceId, {
|
|
30
|
+
message: 'Select device to fetch telemetry from:',
|
|
31
|
+
required: true,
|
|
32
|
+
})
|
|
33
|
+
: options.deviceId;
|
|
34
|
+
if (!deviceId) {
|
|
35
|
+
throw new Error('--device-id is required when not using --url. Usage: edgible device telemetry --device-id <id>');
|
|
36
|
+
}
|
|
37
|
+
const device = await instances_1.deviceService.getDevice(deviceId);
|
|
38
|
+
if (!device) {
|
|
39
|
+
throw new Error(`Device not found: ${deviceId}`);
|
|
40
|
+
}
|
|
41
|
+
if (!device.telemetryUrl?.trim()) {
|
|
42
|
+
throw new Error(`No telemetry URL configured for device "${device.name}" (${deviceId}). Telemetry may not be set up for this device.`);
|
|
43
|
+
}
|
|
44
|
+
telemetryBaseUrl = device.telemetryUrl.trim();
|
|
45
|
+
if (!telemetryBaseUrl.startsWith('http://') && !telemetryBaseUrl.startsWith('https://')) {
|
|
46
|
+
telemetryBaseUrl = `https://${telemetryBaseUrl}`;
|
|
47
|
+
}
|
|
48
|
+
instances_1.logger.debug('Using device telemetry URL', { deviceId, telemetryUrl: telemetryBaseUrl });
|
|
49
|
+
}
|
|
50
|
+
const endpoint = options.endpoint?.trim() || DEFAULT_ENDPOINT;
|
|
51
|
+
const { data, status } = await instances_1.deviceService.fetchTelemetry(telemetryBaseUrl, endpoint);
|
|
52
|
+
if (options.json) {
|
|
53
|
+
console.log(JSON.stringify(data, null, 2));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
console.log(chalk_1.default.green(`✓ Telemetry (${status}) from ${telemetryBaseUrl}${endpoint}`));
|
|
57
|
+
console.log(JSON.stringify(data, null, 2));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/commands/device.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsG1D"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupDeviceCommands = setupDeviceCommands;
|
|
4
|
+
const command_wrapper_1 = require("./base/command-wrapper");
|
|
5
|
+
const list_1 = require("./device/list");
|
|
6
|
+
const delete_1 = require("./device/delete");
|
|
7
|
+
const telemetry_1 = require("./device/telemetry");
|
|
8
|
+
const health_1 = require("./device/health");
|
|
9
|
+
const application_health_1 = require("./device/application-health");
|
|
10
|
+
/**
|
|
11
|
+
* Device command group
|
|
12
|
+
*/
|
|
13
|
+
function setupDeviceCommands(program) {
|
|
14
|
+
const deviceCommand = program
|
|
15
|
+
.command('device')
|
|
16
|
+
.description('List and manage devices in your organization')
|
|
17
|
+
.alias('dev');
|
|
18
|
+
deviceCommand
|
|
19
|
+
.command('list')
|
|
20
|
+
.description('List all devices in the organization')
|
|
21
|
+
.option('--json', 'Output as JSON')
|
|
22
|
+
.option('--type <type>', 'Filter by type: serving or gateway')
|
|
23
|
+
.alias('ls')
|
|
24
|
+
.action((0, command_wrapper_1.wrapCommand)(async (options) => {
|
|
25
|
+
await (0, list_1.handleDeviceList)(options);
|
|
26
|
+
}, {
|
|
27
|
+
requireAuth: true,
|
|
28
|
+
requireOrganization: true,
|
|
29
|
+
}));
|
|
30
|
+
deviceCommand
|
|
31
|
+
.command('delete')
|
|
32
|
+
.description('Delete a device')
|
|
33
|
+
.option('-i, --id <id>', 'Device ID to delete')
|
|
34
|
+
.option('-n, --name <name>', 'Device name to delete')
|
|
35
|
+
.option('-f, --force', 'Skip confirmation prompt')
|
|
36
|
+
.option('--non-interactive', 'Require --id or --name; do not prompt for device')
|
|
37
|
+
.alias('rm')
|
|
38
|
+
.action((0, command_wrapper_1.wrapCommand)(async (options) => {
|
|
39
|
+
await (0, delete_1.handleDeviceDelete)(options);
|
|
40
|
+
}, {
|
|
41
|
+
requireAuth: true,
|
|
42
|
+
requireOrganization: true,
|
|
43
|
+
}));
|
|
44
|
+
deviceCommand
|
|
45
|
+
.command('health')
|
|
46
|
+
.description('Check device health (CPU, memory, disk, uptime) via telemetry')
|
|
47
|
+
.option('-i, --device-id <id>', 'Device ID')
|
|
48
|
+
.option('-n, --name <name>', 'Device name (resolved to ID in your organization)')
|
|
49
|
+
.option('--json', 'Output raw JSON only')
|
|
50
|
+
.option('--non-interactive', 'Require --device-id or --name; do not prompt for device')
|
|
51
|
+
.action((0, command_wrapper_1.wrapCommand)(async (options) => {
|
|
52
|
+
await (0, health_1.handleDeviceHealth)(options);
|
|
53
|
+
}, {
|
|
54
|
+
requireAuth: true,
|
|
55
|
+
requireOrganization: true,
|
|
56
|
+
}));
|
|
57
|
+
deviceCommand
|
|
58
|
+
.command('application-health')
|
|
59
|
+
.description('Check application health (workload status, deployment) for applications running on a device')
|
|
60
|
+
.option('-i, --device-id <id>', 'Device ID')
|
|
61
|
+
.option('-n, --name <name>', 'Device name (resolved to ID in your organization)')
|
|
62
|
+
.option('--json', 'Output raw JSON only')
|
|
63
|
+
.option('--non-interactive', 'Require --device-id or --name; do not prompt for device')
|
|
64
|
+
.alias('app-health')
|
|
65
|
+
.action((0, command_wrapper_1.wrapCommand)(async (options) => {
|
|
66
|
+
await (0, application_health_1.handleDeviceApplicationHealth)(options);
|
|
67
|
+
}, {
|
|
68
|
+
requireAuth: true,
|
|
69
|
+
requireOrganization: true,
|
|
70
|
+
}));
|
|
71
|
+
deviceCommand
|
|
72
|
+
.command('telemetry')
|
|
73
|
+
.description('Get device data from the device telemetry/health endpoint')
|
|
74
|
+
.option('-i, --device-id <id>', 'Device ID (prompt if omitted and not using --url)')
|
|
75
|
+
.option('--url <url>', 'Telemetry base URL (e.g. https://mydevice-telemetry.example.com). Skips device lookup.')
|
|
76
|
+
.option('--endpoint <path>', 'Endpoint path (default: /health/device). Use /health/applications or /health/pools for other data.')
|
|
77
|
+
.option('--json', 'Output raw JSON only (no status line)')
|
|
78
|
+
.option('--non-interactive', 'Require --device-id when not using --url')
|
|
79
|
+
.action((0, command_wrapper_1.wrapCommand)(async (options) => {
|
|
80
|
+
await (0, telemetry_1.handleDeviceTelemetry)(options);
|
|
81
|
+
}, {
|
|
82
|
+
requireAuth: true,
|
|
83
|
+
requireOrganization: false,
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=device.js.map
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
* Stack deploy command handler
|
|
3
3
|
*/
|
|
4
4
|
import { DeployOptions } from '../../types/stack';
|
|
5
|
-
export declare function handleStackDeploy(options: DeployOptions
|
|
5
|
+
export declare function handleStackDeploy(options: Omit<DeployOptions, 'file'> & {
|
|
6
|
+
file?: string;
|
|
7
|
+
}): Promise<void>;
|
|
6
8
|
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/deploy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/deploy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwD/G"}
|
|
@@ -9,14 +9,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.handleStackDeploy = handleStackDeploy;
|
|
10
10
|
const chalk_1 = __importDefault(require("chalk"));
|
|
11
11
|
const instances_1 = require("../../services/instances");
|
|
12
|
+
const stack_file_1 = require("../../utils/stack-file");
|
|
12
13
|
async function handleStackDeploy(options) {
|
|
13
14
|
const { stackService, logger } = (0, instances_1.getServiceInstances)();
|
|
14
15
|
try {
|
|
15
|
-
|
|
16
|
+
const file = (0, stack_file_1.findStackFile)(options.file);
|
|
17
|
+
const deployOptions = { ...options, file };
|
|
18
|
+
logger.info(`Deploying stack from: ${file}`);
|
|
16
19
|
if (options.dryRun) {
|
|
17
20
|
console.log(chalk_1.default.cyan('Running in dry-run mode (no changes will be made)\n'));
|
|
18
21
|
}
|
|
19
|
-
const result = await stackService.deployStack(
|
|
22
|
+
const result = await stackService.deployStack(deployOptions);
|
|
20
23
|
// Display results
|
|
21
24
|
console.log('\n' + chalk_1.default.bold('Deployment Results:'));
|
|
22
25
|
console.log(chalk_1.default.gray('─'.repeat(50)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/diff.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/diff.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6D/E"}
|
|
@@ -9,11 +9,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.handleStackDiff = handleStackDiff;
|
|
10
10
|
const chalk_1 = __importDefault(require("chalk"));
|
|
11
11
|
const instances_1 = require("../../services/instances");
|
|
12
|
+
const stack_file_1 = require("../../utils/stack-file");
|
|
12
13
|
async function handleStackDiff(options) {
|
|
13
14
|
const { stackService, logger } = (0, instances_1.getServiceInstances)();
|
|
14
15
|
try {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const file = (0, stack_file_1.findStackFile)(options.file);
|
|
17
|
+
logger.info(`Computing diff for stack: ${file}`);
|
|
18
|
+
const diff = await stackService.diffStack(file);
|
|
17
19
|
console.log(chalk_1.default.bold('\nStack Differences:'));
|
|
18
20
|
console.log(chalk_1.default.gray('─'.repeat(50)));
|
|
19
21
|
let hasChanges = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/status.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAmD/G"}
|
|
@@ -9,11 +9,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.handleStackStatus = handleStackStatus;
|
|
10
10
|
const chalk_1 = __importDefault(require("chalk"));
|
|
11
11
|
const instances_1 = require("../../services/instances");
|
|
12
|
+
const stack_file_1 = require("../../utils/stack-file");
|
|
12
13
|
async function handleStackStatus(options) {
|
|
13
14
|
const { stackService, logger } = (0, instances_1.getServiceInstances)();
|
|
14
15
|
try {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const file = (0, stack_file_1.findStackFile)(options.file);
|
|
17
|
+
logger.info(`Getting stack status from: ${file}`);
|
|
18
|
+
const status = await stackService.getStackStatus(file);
|
|
17
19
|
// Filter to single app if specified
|
|
18
20
|
const applications = options.app
|
|
19
21
|
? status.applications.filter(app => app.name === options.app)
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
* Stack teardown command handler
|
|
3
3
|
*/
|
|
4
4
|
import { TeardownOptions } from '../../types/stack';
|
|
5
|
-
export declare function handleStackTeardown(options: TeardownOptions
|
|
5
|
+
export declare function handleStackTeardown(options: Omit<TeardownOptions, 'file'> & {
|
|
6
|
+
file?: string;
|
|
7
|
+
}): Promise<void>;
|
|
6
8
|
//# sourceMappingURL=teardown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teardown.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/teardown.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"teardown.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/teardown.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAiBpD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2DnH"}
|
|
@@ -43,6 +43,7 @@ exports.handleStackTeardown = handleStackTeardown;
|
|
|
43
43
|
const chalk_1 = __importDefault(require("chalk"));
|
|
44
44
|
const readline = __importStar(require("readline"));
|
|
45
45
|
const instances_1 = require("../../services/instances");
|
|
46
|
+
const stack_file_1 = require("../../utils/stack-file");
|
|
46
47
|
async function promptConfirmation(message) {
|
|
47
48
|
const rl = readline.createInterface({
|
|
48
49
|
input: process.stdin,
|
|
@@ -58,7 +59,9 @@ async function promptConfirmation(message) {
|
|
|
58
59
|
async function handleStackTeardown(options) {
|
|
59
60
|
const { stackService, logger } = (0, instances_1.getServiceInstances)();
|
|
60
61
|
try {
|
|
61
|
-
|
|
62
|
+
const file = (0, stack_file_1.findStackFile)(options.file);
|
|
63
|
+
const teardownOptions = { ...options, file };
|
|
64
|
+
logger.info(`Tearing down stack from: ${file}`);
|
|
62
65
|
// Prompt for confirmation unless --force
|
|
63
66
|
if (!options.force) {
|
|
64
67
|
const confirmed = await promptConfirmation(chalk_1.default.yellow('\n⚠ This will remove all applications in the stack. Continue?'));
|
|
@@ -67,7 +70,7 @@ async function handleStackTeardown(options) {
|
|
|
67
70
|
return;
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
|
-
const result = await stackService.teardownStack(
|
|
73
|
+
const result = await stackService.teardownStack(teardownOptions);
|
|
71
74
|
// Display results
|
|
72
75
|
console.log('\n' + chalk_1.default.bold('Teardown Results:'));
|
|
73
76
|
console.log(chalk_1.default.gray('─'.repeat(50)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/validate.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/stack/validate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiCnF"}
|
|
@@ -9,11 +9,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.handleStackValidate = handleStackValidate;
|
|
10
10
|
const chalk_1 = __importDefault(require("chalk"));
|
|
11
11
|
const instances_1 = require("../../services/instances");
|
|
12
|
+
const stack_file_1 = require("../../utils/stack-file");
|
|
12
13
|
async function handleStackValidate(options) {
|
|
13
14
|
const { stackService, logger } = (0, instances_1.getServiceInstances)();
|
|
14
15
|
try {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const file = (0, stack_file_1.findStackFile)(options.file);
|
|
17
|
+
logger.info(`Validating stack file: ${file}`);
|
|
18
|
+
const result = await stackService.validateStack(file);
|
|
17
19
|
if (result.valid) {
|
|
18
20
|
console.log(chalk_1.default.green('✓ Stack validation passed'));
|
|
19
21
|
if (result.warnings.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../src/commands/stack.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../src/commands/stack.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiIzD"}
|
package/dist/commands/stack.js
CHANGED
|
@@ -22,13 +22,14 @@ function setupStackCommands(program) {
|
|
|
22
22
|
stackCommand
|
|
23
23
|
.command('deploy')
|
|
24
24
|
.description('Deploy or update applications from a stack file')
|
|
25
|
-
.
|
|
25
|
+
.option('-f, --file <path>', 'Path to stack file (default: edgible.yml in current directory)')
|
|
26
26
|
.option('--app <name>', 'Deploy only specified application')
|
|
27
27
|
.option('--dry-run', 'Show what would change without deploying')
|
|
28
28
|
.option('--skip-dependencies', "Don't deploy dependencies")
|
|
29
29
|
.option('--force', 'Force redeployment even if unchanged')
|
|
30
30
|
.addHelpText('after', `
|
|
31
31
|
Examples:
|
|
32
|
+
$ edgible stack deploy
|
|
32
33
|
$ edgible stack deploy -f production.yml
|
|
33
34
|
$ edgible stack deploy -f production.yml --app api-server
|
|
34
35
|
$ edgible stack deploy -f production.yml --dry-run
|
|
@@ -43,12 +44,13 @@ Examples:
|
|
|
43
44
|
stackCommand
|
|
44
45
|
.command('teardown')
|
|
45
46
|
.description('Remove applications defined in a stack')
|
|
46
|
-
.
|
|
47
|
+
.option('-f, --file <path>', 'Path to stack file (default: edgible.yml in current directory)')
|
|
47
48
|
.option('--app <name>', 'Teardown only specified application')
|
|
48
49
|
.option('--force', 'Skip confirmation prompts')
|
|
49
50
|
.option('--keep-dependencies', "Don't teardown dependencies")
|
|
50
51
|
.addHelpText('after', `
|
|
51
52
|
Examples:
|
|
53
|
+
$ edgible stack teardown
|
|
52
54
|
$ edgible stack teardown -f production.yml
|
|
53
55
|
$ edgible stack teardown -f production.yml --app worker
|
|
54
56
|
$ edgible stack teardown -f production.yml --force
|
|
@@ -63,11 +65,12 @@ Examples:
|
|
|
63
65
|
stackCommand
|
|
64
66
|
.command('status')
|
|
65
67
|
.description('Check the status of applications in a stack')
|
|
66
|
-
.
|
|
68
|
+
.option('-f, --file <path>', 'Path to stack file (default: edgible.yml in current directory)')
|
|
67
69
|
.option('--json', 'Output as JSON')
|
|
68
70
|
.option('--app <name>', 'Show status for specific application')
|
|
69
71
|
.addHelpText('after', `
|
|
70
72
|
Examples:
|
|
73
|
+
$ edgible stack status
|
|
71
74
|
$ edgible stack status -f production.yml
|
|
72
75
|
$ edgible stack status -f production.yml --json
|
|
73
76
|
$ edgible stack status -f production.yml --app database
|
|
@@ -82,9 +85,10 @@ Examples:
|
|
|
82
85
|
stackCommand
|
|
83
86
|
.command('validate')
|
|
84
87
|
.description('Validate a stack file without deploying')
|
|
85
|
-
.
|
|
88
|
+
.option('-f, --file <path>', 'Path to stack file (default: edgible.yml in current directory)')
|
|
86
89
|
.addHelpText('after', `
|
|
87
90
|
Examples:
|
|
91
|
+
$ edgible stack validate
|
|
88
92
|
$ edgible stack validate -f production.yml
|
|
89
93
|
`)
|
|
90
94
|
.action((0, command_wrapper_1.wrapCommand)(async (options) => {
|
|
@@ -97,9 +101,10 @@ Examples:
|
|
|
97
101
|
stackCommand
|
|
98
102
|
.command('diff')
|
|
99
103
|
.description('Show differences between stack and deployed state')
|
|
100
|
-
.
|
|
104
|
+
.option('-f, --file <path>', 'Path to stack file (default: edgible.yml in current directory)')
|
|
101
105
|
.addHelpText('after', `
|
|
102
106
|
Examples:
|
|
107
|
+
$ edgible stack diff
|
|
103
108
|
$ edgible stack diff -f production.yml
|
|
104
109
|
`)
|
|
105
110
|
.action((0, command_wrapper_1.wrapCommand)(async (options) => {
|