MCPcopy
hub / github.com/vercel/hyper / resolveRequest

Method resolveRequest

bin/yarn-standalone.js:50947–50968  ·  view source on GitHub ↗
(desiredVersion)

Source from the content-addressed store, hash-verified

50945 }
50946
50947 resolveRequest(desiredVersion) {
50948 var _this = this;
50949
50950 return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
50951 if (_this.config.offline) {
50952 const res = yield _this.resolveRequestOffline();
50953 if (res != null) {
50954 return res;
50955 }
50956 }
50957
50958 const escapedName = (_npmRegistry || _load_npmRegistry()).default.escapeName(_this.name);
50959 const desiredRange = desiredVersion || _this.range;
50960 const body = yield _this.config.registries.npm.request(escapedName);
50961
50962 if (body) {
50963 return NpmResolver.findVersionInRegistryResponse(_this.config, escapedName, desiredRange, body, _this.request);
50964 } else {
50965 return null;
50966 }
50967 })();
50968 }
50969
50970 resolveRequestOffline() {
50971 var _this2 = this;

Callers 1

resolveMethod · 0.80

Calls 6

_load_asyncToGeneratorFunction · 0.85
_load_npmRegistryFunction · 0.85
resolveRequestOfflineMethod · 0.80
escapeNameMethod · 0.80
requestMethod · 0.45

Tested by

no test coverage detected