()
| 50679 | } |
| 50680 | |
| 50681 | resolve() { |
| 50682 | var _this = this; |
| 50683 | |
| 50684 | return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { |
| 50685 | let loc = _this.loc; |
| 50686 | if (!(_path || _load_path()).default.isAbsolute(loc)) { |
| 50687 | loc = (_path || _load_path()).default.resolve(_this.config.lockfileFolder, loc); |
| 50688 | } |
| 50689 | |
| 50690 | if (_this.config.linkFileDependencies) { |
| 50691 | const registry = 'npm'; |
| 50692 | const manifest = { _uid: '', name: '', version: '0.0.0', _registry: registry }; |
| 50693 | manifest._remote = { |
| 50694 | type: 'link', |
| 50695 | registry, |
| 50696 | hash: null, |
| 50697 | reference: loc |
| 50698 | }; |
| 50699 | manifest._uid = manifest.version; |
| 50700 | return manifest; |
| 50701 | } |
| 50702 | if (!(yield (_fs || _load_fs()).exists(loc))) { |
| 50703 | throw new (_errors || _load_errors()).MessageError(_this.reporter.lang('doesntExist', loc, _this.pattern.split('@')[0])); |
| 50704 | } |
| 50705 | |
| 50706 | const manifest = yield (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { |
| 50707 | try { |
| 50708 | return yield _this.config.readManifest(loc, _this.registry); |
| 50709 | } catch (e) { |
| 50710 | if (e.code === 'ENOENT') { |
| 50711 | return { |
| 50712 | // This is just the default, it can be overridden with key of dependencies |
| 50713 | name: (_path || _load_path()).default.dirname(loc), |
| 50714 | version: '0.0.0', |
| 50715 | _uid: '0.0.0', |
| 50716 | _registry: 'npm' |
| 50717 | }; |
| 50718 | } |
| 50719 | |
| 50720 | throw e; |
| 50721 | } |
| 50722 | })(); |
| 50723 | const registry = manifest._registry; |
| 50724 | (0, (_invariant || _load_invariant()).default)(registry, 'expected registry'); |
| 50725 | |
| 50726 | manifest._remote = { |
| 50727 | type: 'copy', |
| 50728 | registry, |
| 50729 | hash: `${(_uuid || _load_uuid()).default.v4()}-${new Date().getTime()}`, |
| 50730 | reference: loc |
| 50731 | }; |
| 50732 | |
| 50733 | manifest._uid = manifest.version; |
| 50734 | |
| 50735 | return manifest; |
| 50736 | })(); |
| 50737 | } |
| 50738 | } |
nothing calls this directly
no test coverage detected