MCPcopy
hub / github.com/di-sukharev/opencommit / _vaultPath

Function _vaultPath

out/cli.cjs:2010–2029  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

2008 return { ciphertext, key };
2009 }
2010 function _vaultPath(options) {
2011 let possibleVaultPath = null;
2012 if (options && options.path && options.path.length > 0) {
2013 if (Array.isArray(options.path)) {
2014 for (const filepath of options.path) {
2015 if (fs7.existsSync(filepath)) {
2016 possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
2017 }
2018 }
2019 } else {
2020 possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
2021 }
2022 } else {
2023 possibleVaultPath = path5.resolve(process.cwd(), ".env.vault");
2024 }
2025 if (fs7.existsSync(possibleVaultPath)) {
2026 return possibleVaultPath;
2027 }
2028 return null;
2029 }
2030 function _resolveHome(envPath) {
2031 return envPath[0] === "~" ? path5.join(os4.homedir(), envPath.slice(1)) : envPath;
2032 }

Callers 2

_parseVaultFunction · 0.85
config8Function · 0.85

Calls 1

endsWithMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…