@padua/cli 2.0.17 → 2.0.18
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/exec/aws.d.ts +21 -0
- package/dist/commands/exec/aws.d.ts.map +1 -0
- package/dist/commands/exec/aws.js +205 -0
- package/dist/commands/exec/aws.js.map +1 -0
- package/dist/commands/exec/index.d.ts +12 -0
- package/dist/commands/exec/index.d.ts.map +1 -0
- package/dist/commands/exec/index.js +261 -0
- package/dist/commands/exec/index.js.map +1 -0
- package/dist/commands/exec/types.d.ts +40 -0
- package/dist/commands/exec/types.d.ts.map +1 -0
- package/dist/commands/exec/types.js +17 -0
- package/dist/commands/exec/types.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EcsCluster, EcsService, EcsTask, EcsContainer } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* List ECS clusters in the account
|
|
4
|
+
*/
|
|
5
|
+
export declare function listClusters(profile: string, verbose?: boolean): EcsCluster[];
|
|
6
|
+
/**
|
|
7
|
+
* List ECS services in a cluster
|
|
8
|
+
*/
|
|
9
|
+
export declare function listServices(cluster: string, profile: string, verbose?: boolean): EcsService[];
|
|
10
|
+
/**
|
|
11
|
+
* List running tasks for a service in a cluster
|
|
12
|
+
*/
|
|
13
|
+
export declare function listTasks(cluster: string, service: string, profile: string, verbose?: boolean): EcsTask[];
|
|
14
|
+
/**
|
|
15
|
+
* Describe a task to get container details
|
|
16
|
+
*/
|
|
17
|
+
export declare function describeTask(cluster: string, taskId: string, profile: string, verbose?: boolean): {
|
|
18
|
+
task: EcsTask;
|
|
19
|
+
containers: EcsContainer[];
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=aws.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/aws.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAsB,MAAM,SAAS,CAAC;AAI5F;;GAEG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,OAAO,GAChB,UAAU,EAAE,CA4Cd;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,OAAO,GAChB,UAAU,EAAE,CA6Cd;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,EAAE,CAuFX;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,OAAO,GAChB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,YAAY,EAAE,CAAA;CAAE,CA4D/C"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listClusters = listClusters;
|
|
4
|
+
exports.listServices = listServices;
|
|
5
|
+
exports.listTasks = listTasks;
|
|
6
|
+
exports.describeTask = describeTask;
|
|
7
|
+
const child_process_1 = require("child_process");
|
|
8
|
+
const utils_1 = require("../login/utils");
|
|
9
|
+
const types_1 = require("./types");
|
|
10
|
+
const AWS_TIMEOUT_MS = 30000;
|
|
11
|
+
/**
|
|
12
|
+
* List ECS clusters in the account
|
|
13
|
+
*/
|
|
14
|
+
function listClusters(profile, verbose) {
|
|
15
|
+
if (verbose) {
|
|
16
|
+
console.log(' [verbose] Listing ECS clusters...');
|
|
17
|
+
}
|
|
18
|
+
const result = (0, child_process_1.spawnSync)('aws', [
|
|
19
|
+
'ecs',
|
|
20
|
+
'list-clusters',
|
|
21
|
+
'--query', 'clusterArns',
|
|
22
|
+
'--output', 'json',
|
|
23
|
+
'--profile', profile,
|
|
24
|
+
], {
|
|
25
|
+
shell: false,
|
|
26
|
+
timeout: AWS_TIMEOUT_MS,
|
|
27
|
+
maxBuffer: 1024 * 1024,
|
|
28
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
29
|
+
env: { ...(0, utils_1.getSubprocessEnv)(), AWS_PROFILE: profile },
|
|
30
|
+
});
|
|
31
|
+
if (result.error) {
|
|
32
|
+
throw new Error(`Failed to list ECS clusters: ${(0, utils_1.sanitizeOutput)(result.error.message)}`);
|
|
33
|
+
}
|
|
34
|
+
if (result.status !== 0) {
|
|
35
|
+
const stderr = result.stderr?.toString() || '';
|
|
36
|
+
throw new Error(`Failed to list ECS clusters: ${(0, utils_1.sanitizeOutput)(stderr)}`);
|
|
37
|
+
}
|
|
38
|
+
const arns = JSON.parse(result.stdout?.toString() || '[]');
|
|
39
|
+
const clusters = arns.map((arn) => ({
|
|
40
|
+
name: (0, types_1.extractNameFromArn)(arn),
|
|
41
|
+
arn,
|
|
42
|
+
}));
|
|
43
|
+
if (verbose) {
|
|
44
|
+
console.log(` [verbose] Found ${clusters.length} clusters`);
|
|
45
|
+
}
|
|
46
|
+
return clusters.sort((a, b) => a.name.localeCompare(b.name));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* List ECS services in a cluster
|
|
50
|
+
*/
|
|
51
|
+
function listServices(cluster, profile, verbose) {
|
|
52
|
+
if (verbose) {
|
|
53
|
+
console.log(` [verbose] Listing services in cluster: ${cluster}`);
|
|
54
|
+
}
|
|
55
|
+
const result = (0, child_process_1.spawnSync)('aws', [
|
|
56
|
+
'ecs',
|
|
57
|
+
'list-services',
|
|
58
|
+
'--cluster', cluster,
|
|
59
|
+
'--query', 'serviceArns',
|
|
60
|
+
'--output', 'json',
|
|
61
|
+
'--profile', profile,
|
|
62
|
+
], {
|
|
63
|
+
shell: false,
|
|
64
|
+
timeout: AWS_TIMEOUT_MS,
|
|
65
|
+
maxBuffer: 1024 * 1024,
|
|
66
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
67
|
+
env: { ...(0, utils_1.getSubprocessEnv)(), AWS_PROFILE: profile },
|
|
68
|
+
});
|
|
69
|
+
if (result.error) {
|
|
70
|
+
throw new Error(`Failed to list services: ${(0, utils_1.sanitizeOutput)(result.error.message)}`);
|
|
71
|
+
}
|
|
72
|
+
if (result.status !== 0) {
|
|
73
|
+
const stderr = result.stderr?.toString() || '';
|
|
74
|
+
throw new Error(`Failed to list services: ${(0, utils_1.sanitizeOutput)(stderr)}`);
|
|
75
|
+
}
|
|
76
|
+
const arns = JSON.parse(result.stdout?.toString() || '[]');
|
|
77
|
+
const services = arns.map((arn) => ({
|
|
78
|
+
name: (0, types_1.extractNameFromArn)(arn),
|
|
79
|
+
arn,
|
|
80
|
+
}));
|
|
81
|
+
if (verbose) {
|
|
82
|
+
console.log(` [verbose] Found ${services.length} services`);
|
|
83
|
+
}
|
|
84
|
+
return services.sort((a, b) => a.name.localeCompare(b.name));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* List running tasks for a service in a cluster
|
|
88
|
+
*/
|
|
89
|
+
function listTasks(cluster, service, profile, verbose) {
|
|
90
|
+
if (verbose) {
|
|
91
|
+
console.log(` [verbose] Listing running tasks for service: ${service}`);
|
|
92
|
+
}
|
|
93
|
+
// First, get task ARNs
|
|
94
|
+
const listResult = (0, child_process_1.spawnSync)('aws', [
|
|
95
|
+
'ecs',
|
|
96
|
+
'list-tasks',
|
|
97
|
+
'--cluster', cluster,
|
|
98
|
+
'--service-name', service,
|
|
99
|
+
'--desired-status', 'RUNNING',
|
|
100
|
+
'--query', 'taskArns',
|
|
101
|
+
'--output', 'json',
|
|
102
|
+
'--profile', profile,
|
|
103
|
+
], {
|
|
104
|
+
shell: false,
|
|
105
|
+
timeout: AWS_TIMEOUT_MS,
|
|
106
|
+
maxBuffer: 1024 * 1024,
|
|
107
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
108
|
+
env: { ...(0, utils_1.getSubprocessEnv)(), AWS_PROFILE: profile },
|
|
109
|
+
});
|
|
110
|
+
if (listResult.error) {
|
|
111
|
+
throw new Error(`Failed to list tasks: ${(0, utils_1.sanitizeOutput)(listResult.error.message)}`);
|
|
112
|
+
}
|
|
113
|
+
if (listResult.status !== 0) {
|
|
114
|
+
const stderr = listResult.stderr?.toString() || '';
|
|
115
|
+
throw new Error(`Failed to list tasks: ${(0, utils_1.sanitizeOutput)(stderr)}`);
|
|
116
|
+
}
|
|
117
|
+
const taskArns = JSON.parse(listResult.stdout?.toString() || '[]');
|
|
118
|
+
if (taskArns.length === 0) {
|
|
119
|
+
return [];
|
|
120
|
+
}
|
|
121
|
+
// Describe tasks to get details
|
|
122
|
+
const describeResult = (0, child_process_1.spawnSync)('aws', [
|
|
123
|
+
'ecs',
|
|
124
|
+
'describe-tasks',
|
|
125
|
+
'--cluster', cluster,
|
|
126
|
+
'--tasks', ...taskArns,
|
|
127
|
+
'--query', 'tasks[].{arn:taskArn,lastStatus:lastStatus,startedAt:startedAt}',
|
|
128
|
+
'--output', 'json',
|
|
129
|
+
'--profile', profile,
|
|
130
|
+
], {
|
|
131
|
+
shell: false,
|
|
132
|
+
timeout: AWS_TIMEOUT_MS,
|
|
133
|
+
maxBuffer: 1024 * 1024,
|
|
134
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
135
|
+
env: { ...(0, utils_1.getSubprocessEnv)(), AWS_PROFILE: profile },
|
|
136
|
+
});
|
|
137
|
+
if (describeResult.error) {
|
|
138
|
+
throw new Error(`Failed to describe tasks: ${(0, utils_1.sanitizeOutput)(describeResult.error.message)}`);
|
|
139
|
+
}
|
|
140
|
+
if (describeResult.status !== 0) {
|
|
141
|
+
const stderr = describeResult.stderr?.toString() || '';
|
|
142
|
+
throw new Error(`Failed to describe tasks: ${(0, utils_1.sanitizeOutput)(stderr)}`);
|
|
143
|
+
}
|
|
144
|
+
const tasksData = JSON.parse(describeResult.stdout?.toString() || '[]');
|
|
145
|
+
const tasks = tasksData.map((t) => ({
|
|
146
|
+
taskId: (0, types_1.extractNameFromArn)(t.arn),
|
|
147
|
+
arn: t.arn,
|
|
148
|
+
lastStatus: t.lastStatus,
|
|
149
|
+
startedAt: t.startedAt,
|
|
150
|
+
}));
|
|
151
|
+
if (verbose) {
|
|
152
|
+
console.log(` [verbose] Found ${tasks.length} running tasks`);
|
|
153
|
+
}
|
|
154
|
+
return tasks;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Describe a task to get container details
|
|
158
|
+
*/
|
|
159
|
+
function describeTask(cluster, taskId, profile, verbose) {
|
|
160
|
+
if (verbose) {
|
|
161
|
+
console.log(` [verbose] Describing task: ${taskId}`);
|
|
162
|
+
}
|
|
163
|
+
const result = (0, child_process_1.spawnSync)('aws', [
|
|
164
|
+
'ecs',
|
|
165
|
+
'describe-tasks',
|
|
166
|
+
'--cluster', cluster,
|
|
167
|
+
'--tasks', taskId,
|
|
168
|
+
'--output', 'json',
|
|
169
|
+
'--profile', profile,
|
|
170
|
+
], {
|
|
171
|
+
shell: false,
|
|
172
|
+
timeout: AWS_TIMEOUT_MS,
|
|
173
|
+
maxBuffer: 1024 * 1024,
|
|
174
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
175
|
+
env: { ...(0, utils_1.getSubprocessEnv)(), AWS_PROFILE: profile },
|
|
176
|
+
});
|
|
177
|
+
if (result.error) {
|
|
178
|
+
throw new Error(`Failed to describe task: ${(0, utils_1.sanitizeOutput)(result.error.message)}`);
|
|
179
|
+
}
|
|
180
|
+
if (result.status !== 0) {
|
|
181
|
+
const stderr = result.stderr?.toString() || '';
|
|
182
|
+
throw new Error(`Failed to describe task: ${(0, utils_1.sanitizeOutput)(stderr)}`);
|
|
183
|
+
}
|
|
184
|
+
const data = JSON.parse(result.stdout?.toString() || '{}');
|
|
185
|
+
const taskData = data.tasks?.[0];
|
|
186
|
+
if (!taskData) {
|
|
187
|
+
throw new Error(`Task not found: ${taskId}`);
|
|
188
|
+
}
|
|
189
|
+
const task = {
|
|
190
|
+
taskId: (0, types_1.extractNameFromArn)(taskData.taskArn),
|
|
191
|
+
arn: taskData.taskArn,
|
|
192
|
+
lastStatus: taskData.lastStatus,
|
|
193
|
+
startedAt: taskData.startedAt,
|
|
194
|
+
};
|
|
195
|
+
const containers = (taskData.containers || []).map((c) => ({
|
|
196
|
+
name: c.name,
|
|
197
|
+
runtimeId: c.runtimeId,
|
|
198
|
+
lastStatus: c.lastStatus,
|
|
199
|
+
}));
|
|
200
|
+
if (verbose) {
|
|
201
|
+
console.log(` [verbose] Task has ${containers.length} containers: ${containers.map((c) => c.name).join(', ')}`);
|
|
202
|
+
}
|
|
203
|
+
return { task, containers };
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=aws.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws.js","sourceRoot":"","sources":["../../../src/commands/exec/aws.ts"],"names":[],"mappings":";;AASA,oCA+CC;AAKD,oCAiDC;AAKD,8BA4FC;AAKD,oCAiEC;AArRD,iDAA0C;AAC1C,0CAAkE;AAClE,mCAA4F;AAE5F,MAAM,cAAc,GAAG,KAAK,CAAC;AAE7B;;GAEG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,OAAiB;IAEjB,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,MAAM,GAAG,IAAA,yBAAS,EACtB,KAAK,EACL;QACE,KAAK;QACL,eAAe;QACf,SAAS,EAAE,aAAa;QACxB,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,OAAO;KACrB,EACD;QACE,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,cAAc;QACvB,SAAS,EAAE,IAAI,G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AAC;IAED,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { ExecOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Exec command - open a shell in a running ECS container via SSM
|
|
5
|
+
*/
|
|
6
|
+
export declare const execCommand: Command;
|
|
7
|
+
/**
|
|
8
|
+
* Handle the exec command
|
|
9
|
+
*/
|
|
10
|
+
declare function handleExec(options: ExecOptions): Promise<void>;
|
|
11
|
+
export { handleExec };
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAOtC;;GAEG;AACH,eAAO,MAAM,WAAW,SAUH,CAAC;AAmBtB;;GAEG;AACH,iBAAe,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA8N7D;AAGD,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,261 @@
|
|
|
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.execCommand = void 0;
|
|
7
|
+
exports.handleExec = handleExec;
|
|
8
|
+
const commander_1 = require("commander");
|
|
9
|
+
const child_process_1 = require("child_process");
|
|
10
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
11
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
12
|
+
const aws_1 = require("./aws");
|
|
13
|
+
const prerequisites_1 = require("../init/prerequisites");
|
|
14
|
+
const config_1 = require("../login/config");
|
|
15
|
+
const types_1 = require("../login/types");
|
|
16
|
+
const utils_1 = require("../login/utils");
|
|
17
|
+
/**
|
|
18
|
+
* Exec command - open a shell in a running ECS container via SSM
|
|
19
|
+
*/
|
|
20
|
+
exports.execCommand = new commander_1.Command('exec')
|
|
21
|
+
.description('Open a shell in a running ECS container via SSM')
|
|
22
|
+
.option('-p, --profile <name>', 'AWS profile to use')
|
|
23
|
+
.option('-c, --cluster <name>', 'ECS cluster name')
|
|
24
|
+
.option('-s, --service <name>', 'ECS service name')
|
|
25
|
+
.option('-t, --task <id>', 'ECS task ID')
|
|
26
|
+
.option('--container <name>', 'Container name')
|
|
27
|
+
.option('--command <cmd>', 'Command to run', '/bin/bash')
|
|
28
|
+
.option('-v, --verbose', 'Show detailed output')
|
|
29
|
+
.option('--no-color', 'Disable colored output')
|
|
30
|
+
.action(handleExec);
|
|
31
|
+
/**
|
|
32
|
+
* Format uptime from a start time string
|
|
33
|
+
*/
|
|
34
|
+
function formatUptime(startedAt) {
|
|
35
|
+
const start = new Date(startedAt);
|
|
36
|
+
const now = new Date();
|
|
37
|
+
const diffMs = now.getTime() - start.getTime();
|
|
38
|
+
const hours = Math.floor(diffMs / (1000 * 60 * 60));
|
|
39
|
+
const minutes = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60));
|
|
40
|
+
if (hours > 0) {
|
|
41
|
+
return `${hours}h ${minutes}m`;
|
|
42
|
+
}
|
|
43
|
+
return `${minutes}m`;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Handle the exec command
|
|
47
|
+
*/
|
|
48
|
+
async function handleExec(options) {
|
|
49
|
+
const noColor = options.noColor ?? false;
|
|
50
|
+
// Check prerequisites
|
|
51
|
+
const ssmCheck = (0, prerequisites_1.checkSessionManagerPlugin)();
|
|
52
|
+
if (!ssmCheck.installed) {
|
|
53
|
+
if (!noColor) {
|
|
54
|
+
console.error(chalk_1.default.red('Session Manager Plugin is required for ECS exec.'));
|
|
55
|
+
console.error(chalk_1.default.gray(`Install: ${ssmCheck.installUrl}`));
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
console.error('Session Manager Plugin is required for ECS exec.');
|
|
59
|
+
console.error(`Install: ${ssmCheck.installUrl}`);
|
|
60
|
+
}
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
// Load config and resolve profile
|
|
64
|
+
const config = await (0, config_1.loadConfig)();
|
|
65
|
+
const profile = (0, types_1.getEffectiveProfile)({ profile: options.profile }, config ?? undefined);
|
|
66
|
+
try {
|
|
67
|
+
// Step 1: Cluster selection
|
|
68
|
+
let clusterName;
|
|
69
|
+
if (options.cluster) {
|
|
70
|
+
clusterName = options.cluster;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
if (!noColor) {
|
|
74
|
+
console.log(chalk_1.default.gray('Fetching ECS clusters...'));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
console.log('Fetching ECS clusters...');
|
|
78
|
+
}
|
|
79
|
+
const clusters = (0, aws_1.listClusters)(profile, options.verbose);
|
|
80
|
+
if (clusters.length === 0) {
|
|
81
|
+
throw new Error('No ECS clusters found in this account.');
|
|
82
|
+
}
|
|
83
|
+
const clusterAnswer = await inquirer_1.default.prompt([
|
|
84
|
+
{
|
|
85
|
+
type: 'list',
|
|
86
|
+
name: 'cluster',
|
|
87
|
+
message: 'Select cluster:',
|
|
88
|
+
choices: clusters.map((c) => ({ name: c.name, value: c.name })),
|
|
89
|
+
pageSize: 15,
|
|
90
|
+
},
|
|
91
|
+
]);
|
|
92
|
+
clusterName = clusterAnswer.cluster;
|
|
93
|
+
}
|
|
94
|
+
// Step 2: Service selection
|
|
95
|
+
let serviceName;
|
|
96
|
+
if (options.service) {
|
|
97
|
+
serviceName = options.service;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
if (!noColor) {
|
|
101
|
+
console.log(chalk_1.default.gray(`Fetching services in ${clusterName}...`));
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
console.log(`Fetching services in ${clusterName}...`);
|
|
105
|
+
}
|
|
106
|
+
const services = (0, aws_1.listServices)(clusterName, profile, options.verbose);
|
|
107
|
+
if (services.length === 0) {
|
|
108
|
+
throw new Error(`No services found in cluster ${clusterName}.`);
|
|
109
|
+
}
|
|
110
|
+
const serviceAnswer = await inquirer_1.default.prompt([
|
|
111
|
+
{
|
|
112
|
+
type: 'list',
|
|
113
|
+
name: 'service',
|
|
114
|
+
message: 'Select service:',
|
|
115
|
+
choices: services.map((s) => ({ name: s.name, value: s.name })),
|
|
116
|
+
pageSize: 15,
|
|
117
|
+
},
|
|
118
|
+
]);
|
|
119
|
+
serviceName = serviceAnswer.service;
|
|
120
|
+
}
|
|
121
|
+
// Step 3: Task selection
|
|
122
|
+
let taskId;
|
|
123
|
+
if (options.task) {
|
|
124
|
+
taskId = options.task;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
if (!noColor) {
|
|
128
|
+
console.log(chalk_1.default.gray(`Fetching running tasks for ${serviceName}...`));
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
console.log(`Fetching running tasks for ${serviceName}...`);
|
|
132
|
+
}
|
|
133
|
+
const tasks = (0, aws_1.listTasks)(clusterName, serviceName, profile, options.verbose);
|
|
134
|
+
if (tasks.length === 0) {
|
|
135
|
+
throw new Error(`No running tasks found for service ${serviceName}.`);
|
|
136
|
+
}
|
|
137
|
+
if (tasks.length === 1) {
|
|
138
|
+
taskId = tasks[0].taskId;
|
|
139
|
+
if (!noColor) {
|
|
140
|
+
console.log(chalk_1.default.green(`Auto-selected task: ${taskId}`));
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
console.log(`Auto-selected task: ${taskId}`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
const taskAnswer = await inquirer_1.default.prompt([
|
|
148
|
+
{
|
|
149
|
+
type: 'list',
|
|
150
|
+
name: 'task',
|
|
151
|
+
message: 'Select task:',
|
|
152
|
+
choices: tasks.map((t) => ({
|
|
153
|
+
name: `${t.taskId} (${t.lastStatus}${t.startedAt ? `, up ${formatUptime(t.startedAt)}` : ''})`,
|
|
154
|
+
value: t.taskId,
|
|
155
|
+
})),
|
|
156
|
+
pageSize: 15,
|
|
157
|
+
},
|
|
158
|
+
]);
|
|
159
|
+
taskId = taskAnswer.task;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// Step 4: Container selection
|
|
163
|
+
let containerName;
|
|
164
|
+
if (options.container) {
|
|
165
|
+
containerName = options.container;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
const { containers } = (0, aws_1.describeTask)(clusterName, taskId, profile, options.verbose);
|
|
169
|
+
if (containers.length === 0) {
|
|
170
|
+
throw new Error(`No containers found in task ${taskId}.`);
|
|
171
|
+
}
|
|
172
|
+
if (containers.length === 1) {
|
|
173
|
+
containerName = containers[0].name;
|
|
174
|
+
if (!noColor) {
|
|
175
|
+
console.log(chalk_1.default.green(`Auto-selected container: ${containerName}`));
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
console.log(`Auto-selected container: ${containerName}`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
const containerAnswer = await inquirer_1.default.prompt([
|
|
183
|
+
{
|
|
184
|
+
type: 'list',
|
|
185
|
+
name: 'container',
|
|
186
|
+
message: 'Select container:',
|
|
187
|
+
choices: containers.map((c) => ({
|
|
188
|
+
name: `${c.name} (${c.lastStatus})`,
|
|
189
|
+
value: c.name,
|
|
190
|
+
})),
|
|
191
|
+
pageSize: 15,
|
|
192
|
+
},
|
|
193
|
+
]);
|
|
194
|
+
containerName = containerAnswer.container;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// Step 5: Display connection summary
|
|
198
|
+
const command = options.command || '/bin/bash';
|
|
199
|
+
console.log('');
|
|
200
|
+
if (!noColor) {
|
|
201
|
+
console.log(chalk_1.default.cyan.bold('Connecting to ECS container...'));
|
|
202
|
+
console.log(chalk_1.default.gray(` Cluster: ${clusterName}`));
|
|
203
|
+
console.log(chalk_1.default.gray(` Service: ${serviceName}`));
|
|
204
|
+
console.log(chalk_1.default.gray(` Task: ${taskId}`));
|
|
205
|
+
console.log(chalk_1.default.gray(` Container: ${containerName}`));
|
|
206
|
+
console.log(chalk_1.default.gray(` Command: ${command}`));
|
|
207
|
+
console.log(chalk_1.default.gray(` Profile: ${profile}`));
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
console.log('Connecting to ECS container...');
|
|
211
|
+
console.log(` Cluster: ${clusterName}`);
|
|
212
|
+
console.log(` Service: ${serviceName}`);
|
|
213
|
+
console.log(` Task: ${taskId}`);
|
|
214
|
+
console.log(` Container: ${containerName}`);
|
|
215
|
+
console.log(` Command: ${command}`);
|
|
216
|
+
console.log(` Profile: ${profile}`);
|
|
217
|
+
}
|
|
218
|
+
console.log('');
|
|
219
|
+
// Step 6: Spawn ECS execute-command
|
|
220
|
+
const child = (0, child_process_1.spawn)('aws', [
|
|
221
|
+
'ecs', 'execute-command',
|
|
222
|
+
'--cluster', clusterName,
|
|
223
|
+
'--task', taskId,
|
|
224
|
+
'--container', containerName,
|
|
225
|
+
'--interactive',
|
|
226
|
+
'--command', command,
|
|
227
|
+
'--profile', profile,
|
|
228
|
+
], {
|
|
229
|
+
stdio: 'inherit',
|
|
230
|
+
env: { ...(0, utils_1.getSubprocessEnv)(), AWS_PROFILE: profile },
|
|
231
|
+
});
|
|
232
|
+
child.on('error', (error) => {
|
|
233
|
+
throw new Error(`Failed to start ECS exec session: ${error.message}`);
|
|
234
|
+
});
|
|
235
|
+
await new Promise((resolve) => {
|
|
236
|
+
child.on('close', (code) => {
|
|
237
|
+
if (code !== 0 && code !== null) {
|
|
238
|
+
console.log('');
|
|
239
|
+
if (!noColor) {
|
|
240
|
+
console.log(chalk_1.default.red(`Session exited with code: ${code}`));
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
console.log(`Session exited with code: ${code}`);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
resolve();
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
catch (error) {
|
|
251
|
+
const message = error.message;
|
|
252
|
+
if (!noColor) {
|
|
253
|
+
console.error(chalk_1.default.red(`Error: ${message}`));
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
console.error(`Error: ${message}`);
|
|
257
|
+
}
|
|
258
|
+
process.exit(1);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/exec/index.ts"],"names":[],"mappings":";;;;;;AA+QS,gCAAU;AA/QnB,yCAAoC;AACpC,iDAAsC;AACtC,kDAA0B;AAC1B,wDAAgC;AAEhC,+BAA4E;AAC5E,yDAAkE;AAClE,4CAA6C;AAC7C,0CAAqD;AACrD,0CAAkD;AAElD;;GAEG;AACU,QAAA,WAAW,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC;KAC3C,WAAW,CAAC,iDAAiD,CAAC;KAC9D,MAAM,CAAC,sBAAsB,EAAE,oBAAoB,CAAC;KACpD,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC;KAClD,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC;KAClD,MAAM,CAAC,iBAAiB,EAAE,aAAa,CAAC;KACxC,MAAM,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;KAC9C,MAAM,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,WAAW,CAAC;KACxD,MAAM,CAAC,eAAe,EAAE,sBAAsB,CAAC;KAC/C,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAAC;KAC9C,MAAM,CAAC,UAAU,CAAC,CAAC;AAEtB;;GAEG;AACH,SAAS,Y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BACnD,CAAC;gBACH,CAAC;gBACD,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAI,KAAe,CAAC,OAAO,CAAC;QACzC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the exec command
|
|
3
|
+
*/
|
|
4
|
+
export interface ExecOptions {
|
|
5
|
+
profile?: string;
|
|
6
|
+
cluster?: string;
|
|
7
|
+
service?: string;
|
|
8
|
+
task?: string;
|
|
9
|
+
container?: string;
|
|
10
|
+
command?: string;
|
|
11
|
+
verbose?: boolean;
|
|
12
|
+
noColor?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface EcsCluster {
|
|
15
|
+
name: string;
|
|
16
|
+
arn: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EcsService {
|
|
19
|
+
name: string;
|
|
20
|
+
arn: string;
|
|
21
|
+
}
|
|
22
|
+
export interface EcsTask {
|
|
23
|
+
taskId: string;
|
|
24
|
+
arn: string;
|
|
25
|
+
lastStatus: string;
|
|
26
|
+
startedAt?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface EcsContainer {
|
|
29
|
+
name: string;
|
|
30
|
+
runtimeId?: string;
|
|
31
|
+
lastStatus: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Extract short name from an ECS ARN.
|
|
35
|
+
* e.g. "arn:aws:ecs:us-east-1:123456789012:cluster/my-cluster" -> "my-cluster"
|
|
36
|
+
* e.g. "arn:aws:ecs:us-east-1:123456789012:service/my-cluster/my-service" -> "my-service"
|
|
37
|
+
* e.g. "arn:aws:ecs:us-east-1:123456789012:task/my-cluster/abc123" -> "abc123"
|
|
38
|
+
*/
|
|
39
|
+
export declare function extractNameFromArn(arn: string): string;
|
|
40
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGtD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Types for the exec command
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.extractNameFromArn = extractNameFromArn;
|
|
7
|
+
/**
|
|
8
|
+
* Extract short name from an ECS ARN.
|
|
9
|
+
* e.g. "arn:aws:ecs:us-east-1:123456789012:cluster/my-cluster" -> "my-cluster"
|
|
10
|
+
* e.g. "arn:aws:ecs:us-east-1:123456789012:service/my-cluster/my-service" -> "my-service"
|
|
11
|
+
* e.g. "arn:aws:ecs:us-east-1:123456789012:task/my-cluster/abc123" -> "abc123"
|
|
12
|
+
*/
|
|
13
|
+
function extractNameFromArn(arn) {
|
|
14
|
+
const parts = arn.split('/');
|
|
15
|
+
return parts[parts.length - 1];
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/commands/exec/types.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA0CH,gDAGC;AATD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,GAAW;IAC5C,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ const status_1 = require("./commands/status");
|
|
|
10
10
|
const profile_1 = require("./commands/profile");
|
|
11
11
|
const tunnel_1 = require("./commands/tunnel");
|
|
12
12
|
const doctor_1 = require("./commands/doctor");
|
|
13
|
+
const exec_1 = require("./commands/exec");
|
|
13
14
|
// Read version from package.json
|
|
14
15
|
const packageJson = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '..', 'package.json'), 'utf-8'));
|
|
15
16
|
const program = new commander_1.Command();
|
|
@@ -24,5 +25,6 @@ program.addCommand(status_1.statusCommand);
|
|
|
24
25
|
program.addCommand(profile_1.profileCommand);
|
|
25
26
|
program.addCommand(tunnel_1.tunnelCommand);
|
|
26
27
|
program.addCommand(doctor_1.doctorCommand);
|
|
28
|
+
program.addCommand(exec_1.execCommand);
|
|
27
29
|
program.parse();
|
|
28
30
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,2BAAkC;AAClC,+BAA4B;AAC5B,0CAA8C;AAC9C,4CAAgD;AAChD,8CAAkD;AAClD,gDAAoD;AACpD,8CAAkD;AAClD,8CAAkD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,2BAAkC;AAClC,+BAA4B;AAC5B,0CAA8C;AAC9C,4CAAgD;AAChD,8CAAkD;AAClD,gDAAoD;AACpD,8CAAkD;AAClD,8CAAkD;AAClD,0CAA8C;AAE9C,iCAAiC;AACjC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAC7D,CAAC;AAEF,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,OAAO,CAAC;KACb,WAAW,CAAC,2CAA2C,CAAC;KACxD,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAEhC,oBAAoB;AACpB,OAAO,CAAC,UAAU,CAAC,kBAAW,CAAC,CAAC;AAChC,OAAO,CAAC,UAAU,CAAC,oBAAY,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,sBAAa,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,wBAAc,CAAC,CAAC;AACnC,OAAO,CAAC,UAAU,CAAC,sBAAa,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,sBAAa,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,kBAAW,CAAC,CAAC;AAEhC,OAAO,CAAC,KAAK,EAAE,CAAC"}
|