(options)
| 1932 | return obj; |
| 1933 | } |
| 1934 | function _parseVault(options) { |
| 1935 | const vaultPath = _vaultPath(options); |
| 1936 | const result = DotenvModule.configDotenv({ path: vaultPath }); |
| 1937 | if (!result.parsed) { |
| 1938 | const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`); |
| 1939 | err.code = "MISSING_DATA"; |
| 1940 | throw err; |
| 1941 | } |
| 1942 | const keys = _dotenvKey(options).split(","); |
| 1943 | const length = keys.length; |
| 1944 | let decrypted; |
| 1945 | for (let i3 = 0; i3 < length; i3++) { |
| 1946 | try { |
| 1947 | const key = keys[i3].trim(); |
| 1948 | const attrs = _instructions(result, key); |
| 1949 | decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); |
| 1950 | break; |
| 1951 | } catch (error) { |
| 1952 | if (i3 + 1 >= length) { |
| 1953 | throw error; |
| 1954 | } |
| 1955 | } |
| 1956 | } |
| 1957 | return DotenvModule.parse(decrypted); |
| 1958 | } |
| 1959 | function _log(message) { |
| 1960 | console.log(`[dotenv@${version}][INFO] ${message}`); |
| 1961 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…