ag-awsauth 0.0.288 → 0.0.290

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.
@@ -17,6 +17,7 @@ const shared_ini_file_loader_1 = require("@aws-sdk/shared-ini-file-loader");
17
17
  const log_1 = require("ag-common/dist/common/helpers/log");
18
18
  const fs_1 = __importDefault(require("fs"));
19
19
  const ini_1 = require("ini");
20
+ const path_1 = require("path");
20
21
  const getCredentialsFilepath_1 = require("./getCredentialsFilepath");
21
22
  const getAwsCredentials = () => __awaiter(void 0, void 0, void 0, function* () {
22
23
  const config = yield (0, shared_ini_file_loader_1.loadSharedConfigFiles)();
@@ -47,6 +48,11 @@ const updateAwsCredentials = (p) => __awaiter(void 0, void 0, void 0, function*
47
48
  const newcreds = (0, ini_1.stringify)(creds);
48
49
  (0, log_1.info)(`saving updated default creds to .aws/credentials`);
49
50
  const credspath = (0, getCredentialsFilepath_1.getCredentialsFilepath)();
51
+ const credentialsDir = (0, path_1.dirname)(credspath);
52
+ if (!fs_1.default.existsSync(credentialsDir)) {
53
+ fs_1.default.mkdirSync(credentialsDir, { recursive: true });
54
+ (0, log_1.info)(`created AWS credentials directory: ${credentialsDir}`);
55
+ }
50
56
  fs_1.default.writeFileSync(credspath, newcreds);
51
57
  });
52
58
  exports.updateAwsCredentials = updateAwsCredentials;
@@ -93,7 +93,6 @@ function enterMFA() {
93
93
  mfa: (0, readline_sync_1.question)('Enter MFA code:', {
94
94
  min: 6,
95
95
  max: 6,
96
- hideEchoBack: true,
97
96
  }),
98
97
  };
99
98
  }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author": "andreigec@hotmail.com",
6
6
  "license": "ISC",
7
7
  "private": false,
8
- "version": "0.0.288",
8
+ "version": "0.0.290",
9
9
  "preferGlobal": true,
10
10
  "bin": {
11
11
  "ag-awsauth": "./bin/awsauth.js"