MCPcopy
hub / github.com/Kong/insomnia / loadRcFile

Function loadRcFile

packages/insomnia/bin/yarn-standalone.js:58410–58424  ·  view source on GitHub ↗
(fileText, filePath)

Source from the content-addressed store, hash-verified

58408}
58409
58410function loadRcFile(fileText, filePath) {
58411 var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, 'yarnrc');
58412
58413 const values = _parse.object;
58414
58415 // some keys reference directories so keep their relativity
58416
58417 for (const key in values) {
58418 if (PATH_KEYS.has(key.replace(/^(--)?([^.]+\.)*/, ''))) {
58419 values[key] = (0, (_path || _load_path()).resolve)((0, (_path || _load_path()).dirname)(filePath), values[key]);
58420 }
58421 }
58422
58423 return values;
58424}
58425
58426// get the built of arguments of a .yarnrc chain of the passed cwd
58427function buildRcArgs(cwd, args) {

Callers 1

getRcConfigForCwdFunction · 0.85

Calls 3

_load_lockfileFunction · 0.85
_load_pathFunction · 0.85
hasMethod · 0.80

Tested by

no test coverage detected