MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / matchAll

Method matchAll

out/cli.cjs:61712–61749  ·  view source on GitHub ↗
(request3 = void 0, options = {})

Source from the content-addressed store, hash-verified

61710 request3 = webidl.converters.RequestInfo(request3);
61711 options = webidl.converters.CacheQueryOptions(options);
61712 const p4 = await this.matchAll(request3, options);
61713 if (p4.length === 0) {
61714 return;
61715 }
61716 return p4[0];
61717 }
61718 async matchAll(request3 = void 0, options = {}) {
61719 webidl.brandCheck(this, _Cache);
61720 if (request3 !== void 0) request3 = webidl.converters.RequestInfo(request3);
61721 options = webidl.converters.CacheQueryOptions(options);
61722 let r3 = null;
61723 if (request3 !== void 0) {
61724 if (request3 instanceof Request6) {
61725 r3 = request3[kState];
61726 if (r3.method !== "GET" && !options.ignoreMethod) {
61727 return [];
61728 }
61729 } else if (typeof request3 === "string") {
61730 r3 = new Request6(request3)[kState];
61731 }
61732 }
61733 const responses = [];
61734 if (request3 === void 0) {
61735 for (const requestResponse of this.#relevantRequestResponseList) {
61736 responses.push(requestResponse[1]);
61737 }
61738 } else {
61739 const requestResponses = this.#queryCache(r3, options);
61740 for (const requestResponse of requestResponses) {
61741 responses.push(requestResponse[1]);
61742 }
61743 }
61744 const responseList = [];
61745 for (const response of responses) {
61746 const responseObject = new Response6(response.body?.source ?? null);
61747 const body = responseObject[kState].body;
61748 responseObject[kState] = response;
61749 responseObject[kState].body = body;
61750 responseObject[kHeaders][kHeadersList] = response.headersList;
61751 responseObject[kHeaders][kGuard] = "immutable";
61752 responseList.push(responseObject);

Callers 2

matchMethod · 0.95
parsePropPathFunction · 0.80

Calls 3

#queryCacheMethod · 0.95
freezeMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected