@padua/cli 1.3.1 → 1.4.0
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.
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
interface ProfileOptions {
|
|
3
|
+
setup?: boolean;
|
|
4
|
+
listOnly?: boolean;
|
|
5
|
+
selectOnly?: boolean;
|
|
6
|
+
noColor?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Shell function for Bash/Zsh that wraps padua profile
|
|
10
|
+
* This function can set AWS_PROFILE in the current shell
|
|
11
|
+
*/
|
|
12
|
+
declare const BASH_FUNCTION: string;
|
|
13
|
+
/**
|
|
14
|
+
* PowerShell function for Windows
|
|
15
|
+
* This function can set AWS_PROFILE in the current session
|
|
16
|
+
*/
|
|
17
|
+
declare const POWERSHELL_FUNCTION: string;
|
|
18
|
+
/**
|
|
19
|
+
* Detect if running in PowerShell on Windows
|
|
20
|
+
*/
|
|
21
|
+
declare function isPowerShell(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Get the appropriate shell function based on platform/shell
|
|
24
|
+
*/
|
|
25
|
+
declare function getShellFunction(): {
|
|
26
|
+
content: string;
|
|
27
|
+
shellType: string;
|
|
28
|
+
configFile: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Profile command - list and select AWS profiles
|
|
32
|
+
*/
|
|
33
|
+
export declare const profileCommand: Command;
|
|
34
|
+
/**
|
|
35
|
+
* Handle the profile command
|
|
36
|
+
*/
|
|
37
|
+
declare function handleProfile(options: ProfileOptions): Promise<void>;
|
|
38
|
+
export { BASH_FUNCTION, POWERSHELL_FUNCTION, isPowerShell, getShellFunction, handleProfile };
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,QAAA,MAAM,aAAa,QAsCX,CAAC;AAET;;;GAGG;AACH,QAAA,MAAM,mBAAmB,QAkCjB,CAAC;AAET;;GAEG;AACH,iBAAS,YAAY,IAAI,OAAO,CAa/B;AAED;;GAEG;AACH,iBAAS,gBAAgB,IAAI;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAatF;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,SAMH,CAAC;AAEzB;;GAEG;AACH,iBAAe,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA6HnE;AAGD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,266 @@
|
|
|
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.POWERSHELL_FUNCTION = exports.BASH_FUNCTION = exports.profileCommand = void 0;
|
|
7
|
+
exports.isPowerShell = isPowerShell;
|
|
8
|
+
exports.getShellFunction = getShellFunction;
|
|
9
|
+
exports.handleProfile = handleProfile;
|
|
10
|
+
const commander_1 = require("commander");
|
|
11
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
12
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
13
|
+
const sso_1 = require("../login/sso");
|
|
14
|
+
/**
|
|
15
|
+
* Shell function for Bash/Zsh that wraps padua profile
|
|
16
|
+
* This function can set AWS_PROFILE in the current shell
|
|
17
|
+
*/
|
|
18
|
+
const BASH_FUNCTION = `
|
|
19
|
+
# Padua AWS Profile Switcher (Bash/Zsh)
|
|
20
|
+
# Add this to your ~/.bashrc or ~/.zshrc, then run: source ~/.bashrc
|
|
21
|
+
paws() {
|
|
22
|
+
if [ -n "$1" ]; then
|
|
23
|
+
# Direct profile specified
|
|
24
|
+
export AWS_PROFILE="$1"
|
|
25
|
+
echo "AWS_PROFILE set to: $1"
|
|
26
|
+
else
|
|
27
|
+
# Interactive selection
|
|
28
|
+
local selected
|
|
29
|
+
selected=$(padua profile --select-only 2>/dev/null)
|
|
30
|
+
if [ -n "$selected" ]; then
|
|
31
|
+
export AWS_PROFILE="$selected"
|
|
32
|
+
echo "AWS_PROFILE set to: $selected"
|
|
33
|
+
fi
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
# Tab completion for paws (Bash)
|
|
38
|
+
if [ -n "$BASH_VERSION" ]; then
|
|
39
|
+
_paws_completions() {
|
|
40
|
+
local profiles
|
|
41
|
+
profiles=$(padua profile --list-only 2>/dev/null)
|
|
42
|
+
COMPREPLY=($(compgen -W "$profiles" -- "\${COMP_WORDS[COMP_CWORD]}"))
|
|
43
|
+
}
|
|
44
|
+
complete -F _paws_completions paws
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# Tab completion for paws (Zsh)
|
|
48
|
+
if [ -n "$ZSH_VERSION" ]; then
|
|
49
|
+
_paws() {
|
|
50
|
+
local profiles
|
|
51
|
+
profiles=(\${(f)"$(padua profile --list-only 2>/dev/null)"})
|
|
52
|
+
_describe 'profile' profiles
|
|
53
|
+
}
|
|
54
|
+
compdef _paws paws 2>/dev/null
|
|
55
|
+
fi
|
|
56
|
+
`.trim();
|
|
57
|
+
exports.BASH_FUNCTION = BASH_FUNCTION;
|
|
58
|
+
/**
|
|
59
|
+
* PowerShell function for Windows
|
|
60
|
+
* This function can set AWS_PROFILE in the current session
|
|
61
|
+
*/
|
|
62
|
+
const POWERSHELL_FUNCTION = `
|
|
63
|
+
# Padua AWS Profile Switcher (PowerShell)
|
|
64
|
+
# Add this to your $PROFILE, then restart PowerShell or run: . $PROFILE
|
|
65
|
+
|
|
66
|
+
function paws {
|
|
67
|
+
param(
|
|
68
|
+
[Parameter(Position=0)]
|
|
69
|
+
[string]$ProfileName
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
if ($ProfileName) {
|
|
73
|
+
# Direct profile specified
|
|
74
|
+
$env:AWS_PROFILE = $ProfileName
|
|
75
|
+
Write-Host "AWS_PROFILE set to: $ProfileName"
|
|
76
|
+
} else {
|
|
77
|
+
# Interactive selection
|
|
78
|
+
$selected = padua profile --select-only 2>$null
|
|
79
|
+
if ($selected) {
|
|
80
|
+
$env:AWS_PROFILE = $selected.Trim()
|
|
81
|
+
Write-Host "AWS_PROFILE set to: $($selected.Trim())"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# Tab completion for paws (PowerShell)
|
|
87
|
+
Register-ArgumentCompleter -CommandName paws -ParameterName ProfileName -ScriptBlock {
|
|
88
|
+
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
|
|
89
|
+
$profiles = padua profile --list-only 2>$null
|
|
90
|
+
if ($profiles) {
|
|
91
|
+
$profiles -split '\\r?\\n' | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
|
|
92
|
+
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
`.trim();
|
|
97
|
+
exports.POWERSHELL_FUNCTION = POWERSHELL_FUNCTION;
|
|
98
|
+
/**
|
|
99
|
+
* Detect if running in PowerShell on Windows
|
|
100
|
+
*/
|
|
101
|
+
function isPowerShell() {
|
|
102
|
+
// Check for PowerShell-specific environment variables
|
|
103
|
+
if (process.env.PSModulePath) {
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
// Check parent process name on Windows
|
|
107
|
+
if (process.platform === 'win32') {
|
|
108
|
+
const parentProcess = process.env.SHELL || process.env.ComSpec || '';
|
|
109
|
+
return parentProcess.toLowerCase().includes('powershell') ||
|
|
110
|
+
parentProcess.toLowerCase().includes('pwsh') ||
|
|
111
|
+
!parentProcess.toLowerCase().includes('bash');
|
|
112
|
+
}
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Get the appropriate shell function based on platform/shell
|
|
117
|
+
*/
|
|
118
|
+
function getShellFunction() {
|
|
119
|
+
if (process.platform === 'win32' || isPowerShell()) {
|
|
120
|
+
return {
|
|
121
|
+
content: POWERSHELL_FUNCTION,
|
|
122
|
+
shellType: 'PowerShell',
|
|
123
|
+
configFile: '$PROFILE',
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
content: BASH_FUNCTION,
|
|
128
|
+
shellType: 'Bash/Zsh',
|
|
129
|
+
configFile: '~/.bashrc or ~/.zshrc',
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Profile command - list and select AWS profiles
|
|
134
|
+
*/
|
|
135
|
+
exports.profileCommand = new commander_1.Command('profile')
|
|
136
|
+
.description('List and select AWS SSO profiles for use with AWS CLI')
|
|
137
|
+
.option('--setup', 'Output shell function for your shell profile')
|
|
138
|
+
.option('--list-only', 'Output profile names only (one per line, for scripts)')
|
|
139
|
+
.option('--select-only', 'Interactive select, output only the profile name')
|
|
140
|
+
.option('--no-color', 'Disable colored output')
|
|
141
|
+
.action(handleProfile);
|
|
142
|
+
/**
|
|
143
|
+
* Handle the profile command
|
|
144
|
+
*/
|
|
145
|
+
async function handleProfile(options) {
|
|
146
|
+
const noColor = options.noColor ?? false;
|
|
147
|
+
// --setup: Output shell function
|
|
148
|
+
if (options.setup) {
|
|
149
|
+
const { content, shellType, configFile } = getShellFunction();
|
|
150
|
+
console.log(`# ${shellType} function - add to ${configFile}`);
|
|
151
|
+
console.log(content);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const profiles = (0, sso_1.listSSOProfiles)();
|
|
155
|
+
if (profiles.length === 0) {
|
|
156
|
+
if (!options.listOnly && !options.selectOnly) {
|
|
157
|
+
if (!noColor) {
|
|
158
|
+
console.error(chalk_1.default.yellow('No AWS SSO profiles found.'));
|
|
159
|
+
console.error(chalk_1.default.gray('Run: padua init'));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
console.error('No AWS SSO profiles found.');
|
|
163
|
+
console.error('Run: padua init');
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
process.exit(1);
|
|
167
|
+
}
|
|
168
|
+
// --list-only: Output profile names for shell completion
|
|
169
|
+
if (options.listOnly) {
|
|
170
|
+
profiles.forEach(p => console.log(p));
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
// --select-only: Interactive select, output only profile name
|
|
174
|
+
if (options.selectOnly) {
|
|
175
|
+
const answer = await inquirer_1.default.prompt([
|
|
176
|
+
{
|
|
177
|
+
type: 'list',
|
|
178
|
+
name: 'profile',
|
|
179
|
+
message: 'Select AWS profile:',
|
|
180
|
+
choices: profiles,
|
|
181
|
+
pageSize: 15,
|
|
182
|
+
},
|
|
183
|
+
]);
|
|
184
|
+
console.log(answer.profile);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
// Default: Show profiles and interactive selection
|
|
188
|
+
const currentProfile = process.env.AWS_PROFILE;
|
|
189
|
+
if (!noColor) {
|
|
190
|
+
console.log(chalk_1.default.cyan.bold('Available AWS SSO Profiles:'));
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
console.log('Available AWS SSO Profiles:');
|
|
194
|
+
}
|
|
195
|
+
console.log('');
|
|
196
|
+
profiles.forEach(p => {
|
|
197
|
+
const isCurrent = p === currentProfile;
|
|
198
|
+
if (!noColor) {
|
|
199
|
+
if (isCurrent) {
|
|
200
|
+
console.log(chalk_1.default.green(` ● ${p} (current)`));
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
console.log(` ○ ${p}`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
if (isCurrent) {
|
|
208
|
+
console.log(` * ${p} (current)`);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
console.log(` ${p}`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
console.log('');
|
|
216
|
+
// Interactive selection
|
|
217
|
+
const answer = await inquirer_1.default.prompt([
|
|
218
|
+
{
|
|
219
|
+
type: 'list',
|
|
220
|
+
name: 'profile',
|
|
221
|
+
message: 'Select profile to use:',
|
|
222
|
+
choices: profiles,
|
|
223
|
+
default: currentProfile || profiles[0],
|
|
224
|
+
pageSize: 15,
|
|
225
|
+
},
|
|
226
|
+
]);
|
|
227
|
+
const { shellType, configFile } = getShellFunction();
|
|
228
|
+
const isWindows = process.platform === 'win32' || isPowerShell();
|
|
229
|
+
const exportCmd = isWindows
|
|
230
|
+
? `$env:AWS_PROFILE = "${answer.profile}"`
|
|
231
|
+
: `export AWS_PROFILE=${answer.profile}`;
|
|
232
|
+
console.log('');
|
|
233
|
+
if (!noColor) {
|
|
234
|
+
console.log(chalk_1.default.cyan('Run this command to set your profile:'));
|
|
235
|
+
console.log('');
|
|
236
|
+
console.log(chalk_1.default.white.bold(` ${exportCmd}`));
|
|
237
|
+
console.log('');
|
|
238
|
+
console.log(chalk_1.default.gray(`Or add the shell function for easier switching (${shellType}):`));
|
|
239
|
+
if (isWindows) {
|
|
240
|
+
console.log(chalk_1.default.gray(' padua profile --setup | Out-File -Append $PROFILE'));
|
|
241
|
+
console.log(chalk_1.default.gray(' . $PROFILE'));
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
console.log(chalk_1.default.gray(` padua profile --setup >> ${configFile.split(' ')[0]}`));
|
|
245
|
+
console.log(chalk_1.default.gray(` source ${configFile.split(' ')[0]}`));
|
|
246
|
+
}
|
|
247
|
+
console.log(chalk_1.default.gray(' Then use: paws [profile]'));
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
console.log('Run this command to set your profile:');
|
|
251
|
+
console.log('');
|
|
252
|
+
console.log(` ${exportCmd}`);
|
|
253
|
+
console.log('');
|
|
254
|
+
console.log(`Or add the shell function for easier switching (${shellType}):`);
|
|
255
|
+
if (isWindows) {
|
|
256
|
+
console.log(' padua profile --setup | Out-File -Append $PROFILE');
|
|
257
|
+
console.log(' . $PROFILE');
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
console.log(` padua profile --setup >> ${configFile.split(' ')[0]}`);
|
|
261
|
+
console.log(` source ${configFile.split(' ')[0]}`);
|
|
262
|
+
}
|
|
263
|
+
console.log(' Then use: paws [profile]');
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/profile/index.ts"],"names":[],"mappings":";;;;;;AAkR6C,oCAAY;AAAE,4CAAgB;AAAE,sCAAa;AAlR1F,yCAAoC;AACpC,kDAA0B;AAC1B,wDAAgC;AAChC,sCAA+C;AAS/C;;;GAGG;AACH,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCrB,CAAC,IAAI,EAAE,CAAC;AA4NA,sCAAa;AA1NtB;;;GAGG;AACH,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC3B,CAAC,IAAI,EAAE,CAAC;AAoLe,kDAAmB;AAlL3C;;GAEG;AACH,SAAS,YAAY;IACnB,sDAAsD;IACtD,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,E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AU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAClF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,YAAY,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,CAAC;IACxD,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,mDAAmD,SAAS,IAAI,CAAC,CAAC;QAC9E,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;YACnE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,8BAA8B,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACtE,OAAO,CAAC,GAAG,CAAC,YAAY,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ const commander_1 = require("commander");
|
|
|
5
5
|
const init_1 = require("./commands/init");
|
|
6
6
|
const login_1 = require("./commands/login");
|
|
7
7
|
const status_1 = require("./commands/status");
|
|
8
|
+
const profile_1 = require("./commands/profile");
|
|
8
9
|
const program = new commander_1.Command();
|
|
9
10
|
program
|
|
10
11
|
.name('padua')
|
|
@@ -14,5 +15,6 @@ program
|
|
|
14
15
|
program.addCommand(init_1.initCommand);
|
|
15
16
|
program.addCommand(login_1.loginCommand);
|
|
16
17
|
program.addCommand(status_1.statusCommand);
|
|
18
|
+
program.addCommand(profile_1.profileCommand);
|
|
17
19
|
program.parse();
|
|
18
20
|
//# 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,0CAA8C;AAC9C,4CAAgD;AAChD,8CAAkD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,0CAA8C;AAC9C,4CAAgD;AAChD,8CAAkD;AAClD,gDAAoD;AAEpD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,OAAO,CAAC;KACb,WAAW,CAAC,2CAA2C,CAAC;KACxD,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,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;AAEnC,OAAO,CAAC,KAAK,EAAE,CAAC"}
|