MCPcopy Create free account
hub / github.com/angular/dev-infra / dispatch

Function dispatch

github-actions/browserstack/set-browserstack-env.js:14753–14889  ·  view source on GitHub ↗
({ body })

Source from the content-addressed store, hash-verified

14751 (_a2 = this.abort) == null ? void 0 : _a2.call(this, err != null ? err : new DOMException("The operation was aborted.", "AbortError"));
14752 }
14753 }
14754 }
14755 };
14756 const request = fetchParams.request;
14757 let response = null;
14758 const timingInfo = fetchParams.timingInfo;
14759 const httpCache = null;
14760 if (httpCache == null) {
14761 request.cache = "no-store";
14762 }
14763 const newConnection = forceNewConnection ? "yes" : "no";
14764 if (request.mode === "websocket") {
14765 } else {
14766 }
14767 let requestBody = null;
14768 if (request.body == null && fetchParams.processRequestEndOfBody) {
14769 queueMicrotask(() => fetchParams.processRequestEndOfBody());
14770 } else if (request.body != null) {
14771 const processBodyChunk = function(bytes) {
14772 return __asyncGenerator(this, null, function* () {
14773 var _a2;
14774 if (isCancelled(fetchParams)) {
14775 return;
14776 }
14777 yield bytes;
14778 (_a2 = fetchParams.processRequestBodyChunkLength) == null ? void 0 : _a2.call(fetchParams, bytes.byteLength);
14779 });
14780 };
14781 const processEndOfBody = () => {
14782 if (isCancelled(fetchParams)) {
14783 return;
14784 }
14785 if (fetchParams.processRequestEndOfBody) {
14786 fetchParams.processRequestEndOfBody();
14787 }
14788 };
14789 const processBodyError = (e) => {
14790 if (isCancelled(fetchParams)) {
14791 return;
14792 }
14793 if (e.name === "AbortError") {
14794 fetchParams.controller.abort();
14795 } else {
14796 fetchParams.controller.terminate(e);
14797 }
14798 };
14799 requestBody = function() {
14800 return __asyncGenerator(this, null, function* () {
14801 try {
14802 try {
14803 for (var iter = __forAwait(request.body.stream), more, temp, error; more = !(temp = yield new __await(iter.next())).done; more = false) {
14804 const bytes = temp.value;
14805 yield* __yieldStar(processBodyChunk(bytes));
14806 }
14807 } catch (temp) {
14808 error = [temp];
14809 } finally {
14810 try {

Callers 5

""Function · 0.70
createDumpInterceptorFunction · 0.70
httpNetworkFetchFunction · 0.70

Calls 2

requestCurrentURLFunction · 0.70
dispatchMethod · 0.45

Tested by

no test coverage detected