ag-awsauth 0.0.295 → 0.0.296
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/helpers/input.d.ts +1 -1
- package/dist/helpers/input.js +2 -2
- package/dist/index.js +4 -0
- package/package.json +1 -1
package/dist/helpers/input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAppInstance, IApplicationArgs } from '../types';
|
|
2
|
-
export declare function chooseAppInstance(ai: IAppInstance[], args: IApplicationArgs): Promise<IAppInstance>;
|
|
2
|
+
export declare function chooseAppInstance(ai: IAppInstance[], args: IApplicationArgs): Promise<IAppInstance | undefined>;
|
|
3
3
|
export declare function readArguments(): Promise<IApplicationArgs>;
|
|
4
4
|
export declare function enterCreds(): {
|
|
5
5
|
username: string;
|
package/dist/helpers/input.js
CHANGED
|
@@ -40,8 +40,8 @@ function chooseAppInstance(ai, args) {
|
|
|
40
40
|
const res = yield (0, cli_select_1.default)({
|
|
41
41
|
values: ai,
|
|
42
42
|
valueRenderer,
|
|
43
|
-
});
|
|
44
|
-
return res.value;
|
|
43
|
+
}).catch(() => undefined);
|
|
44
|
+
return res === null || res === void 0 ? void 0 : res.value;
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
function readArguments() {
|
package/dist/index.js
CHANGED
|
@@ -86,6 +86,10 @@ function main(args) {
|
|
|
86
86
|
(0, log_1.info)('get app instances and display');
|
|
87
87
|
const instances = yield (0, sso_1.appInstances)(credentials);
|
|
88
88
|
const instance = yield (0, input_1.chooseAppInstance)(instances, args);
|
|
89
|
+
if (!instance) {
|
|
90
|
+
(0, log_1.warn)('cancelled');
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
89
93
|
let debugRole = '';
|
|
90
94
|
if (instance.searchMetadata) {
|
|
91
95
|
(0, log_1.info)('account is native aws, directly connecting');
|