@karmaniverous/get-dotenv 2.6.5 → 2.6.7

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';
@@ -44,7 +44,7 @@ const _resolveEscapeSequences = value => {
44
44
  return value.replace(/\\\$/g, '$');
45
45
  };
46
46
  const dotenvExpand = value => {
47
- if (!value) return;
47
+ if (!value || value === 'undefined') return;
48
48
  const result = _resolveEscapeSequences(_interpolate(value));
49
49
  return result.length ? result : undefined;
50
50
  };
@@ -9,8 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
9
9
  // npm imports
10
10
 
11
11
  const getAwsSsoCredentials = localProfile => {
12
- console.log(`localProfile: '${localProfile}'`);
13
- if (!localProfile?.length) {
12
+ if (!(localProfile !== null && localProfile !== void 0 && localProfile.length)) {
14
13
  delete process.env.AWS_ACCESS_KEY_ID;
15
14
  delete process.env.AWS_SECRET_ACCESS_KEY;
16
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;
@@ -46,7 +46,7 @@ const _resolveEscapeSequences = (value) => {
46
46
  };
47
47
 
48
48
  export const dotenvExpand = (value) => {
49
- if (!value) return;
49
+ if (!value || value === 'undefined') return;
50
50
  const result = _resolveEscapeSequences(_interpolate(value));
51
51
  return result.length ? result : undefined;
52
52
  };
@@ -2,7 +2,6 @@
2
2
  import spawn from 'cross-spawn';
3
3
 
4
4
  export const getAwsSsoCredentials = (localProfile) => {
5
- console.log(`localProfile: '${localProfile}'`);
6
5
  if (!localProfile?.length) {
7
6
  delete process.env.AWS_ACCESS_KEY_ID;
8
7
  delete process.env.AWS_SECRET_ACCESS_KEY;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "bin": {
4
4
  "getdotenv": "bin/getdotenv/index.js"
5
5
  },
6
- "version": "2.6.5",
6
+ "version": "2.6.7",
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
  ".": {