* Create a list of dependency requests from the current directories manifests.
(excludePatterns = [], ignoreUnusedPatterns = false)
| 6324 | */ |
| 6325 | |
| 6326 | fetchRequestFromCwd(excludePatterns = [], ignoreUnusedPatterns = false) { |
| 6327 | var _this = this; |
| 6328 | |
| 6329 | return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { |
| 6330 | const patterns = []; |
| 6331 | const deps = []; |
| 6332 | let resolutionDeps = []; |
| 6333 | const manifest = {}; |
| 6334 | |
| 6335 | const ignorePatterns = []; |
| 6336 | const usedPatterns = []; |
| 6337 | let workspaceLayout; |
| 6338 | |
| 6339 | // some commands should always run in the context of the entire workspace |
| 6340 | const cwd = _this.flags.includeWorkspaceDeps || _this.flags.workspaceRootIsCwd ? _this.config.lockfileFolder : _this.config.cwd; |
| 6341 | |
| 6342 | // non-workspaces are always root, otherwise check for workspace root |
| 6343 | const cwdIsRoot = !_this.config.workspaceRootFolder || _this.config.lockfileFolder === cwd; |
| 6344 | |
| 6345 | // exclude package names that are in install args |
| 6346 | const excludeNames = []; |
| 6347 | for (var _iterator = excludePatterns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { |
| 6348 | var _ref; |
| 6349 | |
| 6350 | if (_isArray) { |
| 6351 | if (_i >= _iterator.length) break; |
| 6352 | _ref = _iterator[_i++]; |
| 6353 | } else { |
| 6354 | _i = _iterator.next(); |
| 6355 | if (_i.done) break; |
| 6356 | _ref = _i.value; |
| 6357 | } |
| 6358 | |
| 6359 | const pattern = _ref; |
| 6360 | |
| 6361 | if ((0, (_index3 || _load_index3()).getExoticResolver)(pattern)) { |
| 6362 | excludeNames.push((0, (_guessName || _load_guessName()).default)(pattern)); |
| 6363 | } else { |
| 6364 | // extract the name |
| 6365 | const parts = (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern); |
| 6366 | excludeNames.push(parts.name); |
| 6367 | } |
| 6368 | } |
| 6369 | |
| 6370 | const stripExcluded = function stripExcluded(manifest) { |
| 6371 | for (var _iterator2 = excludeNames, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { |
| 6372 | var _ref2; |
| 6373 | |
| 6374 | if (_isArray2) { |
| 6375 | if (_i2 >= _iterator2.length) break; |
| 6376 | _ref2 = _iterator2[_i2++]; |
| 6377 | } else { |
| 6378 | _i2 = _iterator2.next(); |
| 6379 | if (_i2.done) break; |
| 6380 | _ref2 = _i2.value; |
| 6381 | } |
| 6382 | |
| 6383 | const exclude = _ref2; |
nothing calls this directly
no test coverage detected