ag-awsauth 0.0.46 → 0.0.49
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/config.d.ts +1 -0
- package/dist/config.js +2 -1
- package/dist/helpers/browser.js +11 -6
- package/dist/helpers/input.js +2 -2
- package/package.json +6 -6
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.timeoutMs = exports.runConfig = exports.setConfig = exports.validateConfig = exports.targetRegion = exports.ssoStartUrl = exports.identityCenterRegion = exports.setBasePath = exports.basePath = exports.nativeStsDurationSeconds = exports.stsDurationSeconds = exports.logPath = void 0;
|
|
6
|
+
exports.timeoutShortMs = exports.timeoutMs = exports.runConfig = exports.setConfig = exports.validateConfig = exports.targetRegion = exports.ssoStartUrl = exports.identityCenterRegion = exports.setBasePath = exports.basePath = exports.nativeStsDurationSeconds = exports.stsDurationSeconds = exports.logPath = void 0;
|
|
7
7
|
const envfile_1 = require("envfile");
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
@@ -53,3 +53,4 @@ const runConfig = () => {
|
|
|
53
53
|
};
|
|
54
54
|
exports.runConfig = runConfig;
|
|
55
55
|
exports.timeoutMs = 30000;
|
|
56
|
+
exports.timeoutShortMs = 3000;
|
package/dist/helpers/browser.js
CHANGED
|
@@ -33,7 +33,7 @@ exports.closeBrowser = closeBrowser;
|
|
|
33
33
|
const launchBrowser = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
34
|
const opt = {
|
|
35
35
|
defaultViewport: { height: 1000, width: 500 },
|
|
36
|
-
headless:
|
|
36
|
+
headless: (__1.globalargs === null || __1.globalargs === void 0 ? void 0 : __1.globalargs.verbose) ? false : 'new',
|
|
37
37
|
ignoreHTTPSErrors: true,
|
|
38
38
|
devtools: false,
|
|
39
39
|
};
|
|
@@ -96,7 +96,7 @@ function getMFA(p) {
|
|
|
96
96
|
//
|
|
97
97
|
try {
|
|
98
98
|
const messageDiv = yield page.waitForSelector('.awsui-alert-message', {
|
|
99
|
-
timeout:
|
|
99
|
+
timeout: config_1.timeoutShortMs,
|
|
100
100
|
});
|
|
101
101
|
const value = yield page.evaluate((el) => { var _a; return (_a = el === null || el === void 0 ? void 0 : el.textContent) !== null && _a !== void 0 ? _a : ''; }, messageDiv);
|
|
102
102
|
if (value) {
|
|
@@ -126,7 +126,7 @@ function getMFA(p) {
|
|
|
126
126
|
yield page.waitForNetworkIdle({ idleTime: 250 });
|
|
127
127
|
(0, log_1.info)('waiting for potential error');
|
|
128
128
|
const messageDiv = yield page.waitForSelector('.awsui-alert-message', {
|
|
129
|
-
timeout:
|
|
129
|
+
timeout: config_1.timeoutShortMs,
|
|
130
130
|
});
|
|
131
131
|
const value = yield page.evaluate((el) => { var _a; return (_a = el === null || el === void 0 ? void 0 : el.textContent) !== null && _a !== void 0 ? _a : ''; }, messageDiv);
|
|
132
132
|
if (value) {
|
|
@@ -146,17 +146,22 @@ function getMFA(p) {
|
|
|
146
146
|
}
|
|
147
147
|
} while (retry);
|
|
148
148
|
//
|
|
149
|
-
yield (0, sleep_1.sleep)(
|
|
149
|
+
yield (0, sleep_1.sleep)(config_1.timeoutShortMs);
|
|
150
150
|
yield page.waitForNetworkIdle({ idleTime: 250 });
|
|
151
151
|
(0, log_1.info)('waiting for sign in button');
|
|
152
152
|
yield page.waitForSelector('.awsui-signin-button', {
|
|
153
|
-
timeout:
|
|
153
|
+
timeout: config_1.timeoutShortMs,
|
|
154
154
|
});
|
|
155
155
|
(0, log_1.info)('pressing sign in');
|
|
156
156
|
yield page.$eval('.awsui-signin-button', (el) => el.click());
|
|
157
157
|
(0, log_1.info)('waiting for completion');
|
|
158
158
|
yield (0, sleep_1.sleep)(250);
|
|
159
|
-
|
|
159
|
+
try {
|
|
160
|
+
yield page.waitForNetworkIdle({ idleTime: 250, timeout: config_1.timeoutShortMs });
|
|
161
|
+
}
|
|
162
|
+
catch (e) {
|
|
163
|
+
//
|
|
164
|
+
}
|
|
160
165
|
(0, log_1.info)('waiting for success');
|
|
161
166
|
yield page.waitForSelector('.awsui-icon-variant-success', {
|
|
162
167
|
timeout: config_1.timeoutMs,
|
package/dist/helpers/input.js
CHANGED
|
@@ -44,7 +44,7 @@ function chooseAppInstance(ai, args) {
|
|
|
44
44
|
exports.chooseAppInstance = chooseAppInstance;
|
|
45
45
|
function readArguments() {
|
|
46
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
const { version, applicationfilter, verbose, wipe, config } = yield (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
47
|
+
const { vers: version, applicationfilter, verbose, wipe, config, } = yield (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
48
48
|
.help('h')
|
|
49
49
|
.alias('h', 'help')
|
|
50
50
|
.option('applicationfilter', {
|
|
@@ -70,7 +70,7 @@ function readArguments() {
|
|
|
70
70
|
description: 'Configure application settings',
|
|
71
71
|
default: false,
|
|
72
72
|
})
|
|
73
|
-
.option('
|
|
73
|
+
.option('vers', {
|
|
74
74
|
type: 'boolean',
|
|
75
75
|
description: 'Show application version',
|
|
76
76
|
default: false,
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"author": "andrei gec (andreigec@hotmail.com)",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"private": false,
|
|
8
|
-
"version": "0.0.
|
|
8
|
+
"version": "0.0.49",
|
|
9
9
|
"preferGlobal": true,
|
|
10
10
|
"scripts": {
|
|
11
11
|
"format": "eslint --ext .ts,.tsx ./src --fix",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"LICENSE.md"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@aws-sdk/client-sso": "3.
|
|
27
|
-
"@aws-sdk/client-sso-oidc": "3.
|
|
28
|
-
"@aws-sdk/client-sts": "3.
|
|
26
|
+
"@aws-sdk/client-sso": "3.328.0",
|
|
27
|
+
"@aws-sdk/client-sso-oidc": "3.328.0",
|
|
28
|
+
"@aws-sdk/client-sts": "3.328.0",
|
|
29
29
|
"@aws-sdk/shared-ini-file-loader": "3.310.0",
|
|
30
30
|
"ag-common": "0.0.429",
|
|
31
31
|
"cli-select": "1.1.2",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"eslint-config-e7npm": "0.0.9",
|
|
35
35
|
"ini": "4.1.0",
|
|
36
36
|
"node-fetch": "2.6.9",
|
|
37
|
-
"puppeteer": "20.1.
|
|
37
|
+
"puppeteer": "20.1.1",
|
|
38
38
|
"readline-sync": "1.4.10",
|
|
39
39
|
"typescript": "5.0.4",
|
|
40
40
|
"yargs": "17.7.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/ini": "1.3.31",
|
|
44
|
-
"@types/node": "18.16.
|
|
44
|
+
"@types/node": "18.16.5",
|
|
45
45
|
"@types/node-fetch": "2.6.3",
|
|
46
46
|
"@types/readline-sync": "1.4.4",
|
|
47
47
|
"@types/yargs": "17.0.24"
|