Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 54 additions & 31 deletions .github/local-actions/branch-manager/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -43567,7 +43567,7 @@ var require_retry_handler = __commonJS({
retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3;
}
const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout);
setTimeout(() => cb(null), retryTimeout).unref();
setTimeout(() => cb(null), retryTimeout);
}
onResponseStart(controller, statusCode, headers, statusMessage) {
var _a, _b, _c, _d, _e, _f;
Expand Down Expand Up @@ -43681,7 +43681,7 @@ var require_retry_handler = __commonJS({
}
onResponseError(controller, err) {
var _a, _b;
if (!controller || controller.aborted || isDisturbed(this.opts.body)) {
if ((controller == null ? void 0 : controller.aborted) || isDisturbed(this.opts.body)) {
(_b = (_a = this.handler).onResponseError) == null ? void 0 : _b.call(_a, controller, err);
return;
}
Expand Down Expand Up @@ -46357,7 +46357,7 @@ var require_dns = __commonJS({
}
instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => {
if (err) {
return handler2.onError(err);
return handler2.onResponseError(null, err);
}
let dispatchOpts = null;
dispatchOpts = {
Expand Down Expand Up @@ -52043,7 +52043,7 @@ var require_util12 = __commonJS({
if (buffer.byteLength === buffer.buffer.byteLength) {
return buffer.buffer;
}
return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength);
return new Uint8Array(buffer).buffer;
}
function isValidSubprotocol(protocol) {
if (protocol.length === 0) {
Expand Down Expand Up @@ -52255,6 +52255,7 @@ var require_receiver2 = __commonJS({
var { PerMessageDeflate } = require_permessage_deflate();
var ByteParser = class extends Writable {
#buffers = [];
#fragmentsBytes = 0;
#byteOffset = 0;
#loop = false;
#state = parserStates.INFO;
Expand Down Expand Up @@ -52373,11 +52374,9 @@ var require_receiver2 = __commonJS({
this.#state = parserStates.INFO;
} else {
if (!this.#info.compressed) {
this.#fragments.push(body);
this.writeFragments(body);
if (!this.#info.fragmented && this.#info.fin) {
const fullMessage = Buffer.concat(this.#fragments);
websocketMessageReceived(this.#handler, this.#info.binaryType, fullMessage);
this.#fragments.length = 0;
websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments());
}
this.#state = parserStates.INFO;
} else {
Expand All @@ -52386,17 +52385,16 @@ var require_receiver2 = __commonJS({
failWebsocketConnection(this.#handler, 1007, error2.message);
return;
}
this.#fragments.push(data);
this.writeFragments(data);
if (!this.#info.fin) {
this.#state = parserStates.INFO;
this.#loop = true;
this.run(callback);
return;
}
websocketMessageReceived(this.#handler, this.#info.binaryType, Buffer.concat(this.#fragments));
websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments());
this.#loop = true;
this.#state = parserStates.INFO;
this.#fragments.length = 0;
this.run(callback);
});
this.#loop = false;
Expand All @@ -52412,29 +52410,54 @@ var require_receiver2 = __commonJS({
} else if (n === 0) {
return emptyBuffer;
}
if (this.#buffers[0].length === n) {
this.#byteOffset -= this.#buffers[0].length;
this.#byteOffset -= n;
const first = this.#buffers[0];
if (first.length > n) {
this.#buffers[0] = first.subarray(n, first.length);
return first.subarray(0, n);
} else if (first.length === n) {
return this.#buffers.shift();
}
const buffer = Buffer.allocUnsafe(n);
let offset = 0;
while (offset !== n) {
const next = this.#buffers[0];
const { length } = next;
if (length + offset === n) {
buffer.set(this.#buffers.shift(), offset);
break;
} else if (length + offset > n) {
buffer.set(next.subarray(0, n - offset), offset);
this.#buffers[0] = next.subarray(n - offset);
break;
} else {
buffer.set(this.#buffers.shift(), offset);
offset += next.length;
} else {
let offset = 0;
const buffer = Buffer.allocUnsafeSlow(n);
while (offset !== n) {
const next = this.#buffers[0];
const length = next.length;
if (length + offset === n) {
buffer.set(this.#buffers.shift(), offset);
break;
} else if (length + offset > n) {
buffer.set(next.subarray(0, n - offset), offset);
this.#buffers[0] = next.subarray(n - offset);
break;
} else {
buffer.set(this.#buffers.shift(), offset);
offset += length;
}
}
return buffer;
}
this.#byteOffset -= n;
return buffer;
}
writeFragments(fragment) {
this.#fragmentsBytes += fragment.length;
this.#fragments.push(fragment);
}
consumeFragments() {
const fragments = this.#fragments;
if (fragments.length === 1) {
this.#fragmentsBytes = 0;
return fragments.shift();
}
let offset = 0;
const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes);
for (let i = 0; i < fragments.length; ++i) {
const buffer = fragments[i];
output.set(buffer, offset);
offset += buffer.length;
}
this.#fragments = [];
this.#fragmentsBytes = 0;
return output;
}
parseCloseBody(data) {
assert2(data.length !== 1);
Expand Down
85 changes: 54 additions & 31 deletions .github/local-actions/labels-sync/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27994,7 +27994,7 @@ var require_retry_handler = __commonJS({
retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3;
}
const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout);
setTimeout(() => cb(null), retryTimeout).unref();
setTimeout(() => cb(null), retryTimeout);
}
onResponseStart(controller, statusCode, headers, statusMessage) {
var _a, _b, _c, _d, _e, _f;
Expand Down Expand Up @@ -28108,7 +28108,7 @@ var require_retry_handler = __commonJS({
}
onResponseError(controller, err) {
var _a, _b;
if (!controller || controller.aborted || isDisturbed(this.opts.body)) {
if ((controller == null ? void 0 : controller.aborted) || isDisturbed(this.opts.body)) {
(_b = (_a = this.handler).onResponseError) == null ? void 0 : _b.call(_a, controller, err);
return;
}
Expand Down Expand Up @@ -30784,7 +30784,7 @@ var require_dns = __commonJS({
}
instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => {
if (err) {
return handler2.onError(err);
return handler2.onResponseError(null, err);
}
let dispatchOpts = null;
dispatchOpts = {
Expand Down Expand Up @@ -36470,7 +36470,7 @@ var require_util12 = __commonJS({
if (buffer.byteLength === buffer.buffer.byteLength) {
return buffer.buffer;
}
return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength);
return new Uint8Array(buffer).buffer;
}
function isValidSubprotocol(protocol) {
if (protocol.length === 0) {
Expand Down Expand Up @@ -36682,6 +36682,7 @@ var require_receiver2 = __commonJS({
var { PerMessageDeflate } = require_permessage_deflate();
var ByteParser = class extends Writable {
#buffers = [];
#fragmentsBytes = 0;
#byteOffset = 0;
#loop = false;
#state = parserStates.INFO;
Expand Down Expand Up @@ -36800,11 +36801,9 @@ var require_receiver2 = __commonJS({
this.#state = parserStates.INFO;
} else {
if (!this.#info.compressed) {
this.#fragments.push(body);
this.writeFragments(body);
if (!this.#info.fragmented && this.#info.fin) {
const fullMessage = Buffer.concat(this.#fragments);
websocketMessageReceived(this.#handler, this.#info.binaryType, fullMessage);
this.#fragments.length = 0;
websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments());
}
this.#state = parserStates.INFO;
} else {
Expand All @@ -36813,17 +36812,16 @@ var require_receiver2 = __commonJS({
failWebsocketConnection(this.#handler, 1007, error.message);
return;
}
this.#fragments.push(data);
this.writeFragments(data);
if (!this.#info.fin) {
this.#state = parserStates.INFO;
this.#loop = true;
this.run(callback);
return;
}
websocketMessageReceived(this.#handler, this.#info.binaryType, Buffer.concat(this.#fragments));
websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments());
this.#loop = true;
this.#state = parserStates.INFO;
this.#fragments.length = 0;
this.run(callback);
});
this.#loop = false;
Expand All @@ -36839,29 +36837,54 @@ var require_receiver2 = __commonJS({
} else if (n === 0) {
return emptyBuffer;
}
if (this.#buffers[0].length === n) {
this.#byteOffset -= this.#buffers[0].length;
this.#byteOffset -= n;
const first = this.#buffers[0];
if (first.length > n) {
this.#buffers[0] = first.subarray(n, first.length);
return first.subarray(0, n);
} else if (first.length === n) {
return this.#buffers.shift();
}
const buffer = Buffer.allocUnsafe(n);
let offset = 0;
while (offset !== n) {
const next = this.#buffers[0];
const { length } = next;
if (length + offset === n) {
buffer.set(this.#buffers.shift(), offset);
break;
} else if (length + offset > n) {
buffer.set(next.subarray(0, n - offset), offset);
this.#buffers[0] = next.subarray(n - offset);
break;
} else {
buffer.set(this.#buffers.shift(), offset);
offset += next.length;
} else {
let offset = 0;
const buffer = Buffer.allocUnsafeSlow(n);
while (offset !== n) {
const next = this.#buffers[0];
const length = next.length;
if (length + offset === n) {
buffer.set(this.#buffers.shift(), offset);
break;
} else if (length + offset > n) {
buffer.set(next.subarray(0, n - offset), offset);
this.#buffers[0] = next.subarray(n - offset);
break;
} else {
buffer.set(this.#buffers.shift(), offset);
offset += length;
}
}
return buffer;
}
this.#byteOffset -= n;
return buffer;
}
writeFragments(fragment) {
this.#fragmentsBytes += fragment.length;
this.#fragments.push(fragment);
}
consumeFragments() {
const fragments = this.#fragments;
if (fragments.length === 1) {
this.#fragmentsBytes = 0;
return fragments.shift();
}
let offset = 0;
const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes);
for (let i = 0; i < fragments.length; ++i) {
const buffer = fragments[i];
output.set(buffer, offset);
offset += buffer.length;
}
this.#fragments = [];
this.#fragmentsBytes = 0;
return output;
}
parseCloseBody(data) {
assert(data.length !== 1);
Expand Down
Loading
Loading