@karmaniverous/get-dotenv 2.6.6 → 2.6.8

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.
@@ -10,7 +10,7 @@ import {
10
10
  getAwsSsoCredentials,
11
11
  getDotenv,
12
12
  parseBranch,
13
- } from '@karmaniverous/get-dotenv';
13
+ } from '../../lib/index.js';
14
14
 
15
15
  // Create CLI.
16
16
  import { program } from 'commander';
@@ -146,7 +146,8 @@ await getDotenv({
146
146
  });
147
147
 
148
148
  // Get AWS SSO credentials.
149
- if (awsSsoProfile) getAwsSsoCredentials(dotenvExpand(awsSsoProfile));
149
+ const profile = dotenvExpand(awsSsoProfile);
150
+ if (profile) getAwsSsoCredentials(profile);
150
151
 
151
152
  // Execute shell command.
152
153
  if (command || program.args.length) {
@@ -9,7 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
9
9
  // npm imports
10
10
 
11
11
  const getAwsSsoCredentials = localProfile => {
12
- if (!localProfile?.length) {
12
+ if (!(localProfile !== null && localProfile !== void 0 && localProfile.length)) {
13
13
  delete process.env.AWS_ACCESS_KEY_ID;
14
14
  delete process.env.AWS_SECRET_ACCESS_KEY;
15
15
  delete process.env.AWS_SESSION_TOKEN;
@@ -10,11 +10,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
10
10
  // npm imports
11
11
 
12
12
  const parseBranch = branchName => {
13
+ var _branchName$match;
13
14
  try {
14
15
  branchName ??= _gitBranch.default.sync() ?? '';
15
16
  } catch {
16
17
  branchName ??= '';
17
18
  }
18
- return _lodash.default.omitBy(branchName.match(/^(?:(?<branchType>[^/\s]+)\/(?:(?<branchLabel>[^/\s]+)))?(?:\/?(?<envToken>[^/\s]+))?$/)?.groups ?? {}, _lodash.default.isNil);
19
+ return _lodash.default.omitBy(((_branchName$match = branchName.match(/^(?:(?<branchType>[^/\s]+)\/(?:(?<branchLabel>[^/\s]+)))?(?:\/?(?<envToken>[^/\s]+))?$/)) === null || _branchName$match === void 0 ? void 0 : _branchName$match.groups) ?? {}, _lodash.default.isNil);
19
20
  };
20
21
  exports.parseBranch = parseBranch;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "bin": {
4
4
  "getdotenv": "bin/getdotenv/index.js"
5
5
  },
6
- "version": "2.6.6",
6
+ "version": "2.6.8",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -31,9 +31,9 @@
31
31
  ],
32
32
  "license": "BSD-3-Clause",
33
33
  "dependencies": {
34
- "commander": "^10.0.1",
34
+ "commander": "^11.0.0",
35
35
  "cross-spawn": "^7.0.3",
36
- "dotenv": "^16.0.3",
36
+ "dotenv": "^16.3.1",
37
37
  "dotenv-expand": "^10.0.0",
38
38
  "fs-extra": "^11.1.1",
39
39
  "git-branch": "^2.0.1",
@@ -41,22 +41,20 @@
41
41
  "uuid": "^9.0.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@babel/cli": "^7.21.5",
45
- "@babel/core": "^7.21.8",
46
- "@babel/eslint-parser": "^7.21.8",
47
- "@babel/plugin-syntax-import-assertions": "^7.20.0",
48
- "@babel/preset-env": "^7.21.5",
49
- "@babel/register": "^7.21.0",
50
- "@types/node": "^20.2.1",
44
+ "@babel/cli": "^7.22.5",
45
+ "@babel/core": "^7.22.5",
46
+ "@babel/eslint-parser": "^7.22.5",
47
+ "@babel/preset-env": "^7.22.5",
48
+ "@babel/register": "^7.22.5",
49
+ "@types/node": "^20.3.1",
51
50
  "chai": "^4.3.7",
52
51
  "concat-md": "^0.5.1",
53
- "eslint": "^8.41.0",
54
- "eslint-config-standard": "^17.0.0",
52
+ "eslint": "^8.43.0",
55
53
  "eslint-plugin-mocha": "^10.1.0",
54
+ "eslint-plugin-promise": "^6.1.1",
56
55
  "jsdoc-to-markdown": "^8.0.0",
57
56
  "mocha": "^10.2.0",
58
- "prettier": "^2.8.8",
59
- "release-it": "^15.10.3"
57
+ "release-it": "^15.11.0"
60
58
  },
61
59
  "exports": {
62
60
  ".": {