From 23f5c3dfa5d13a3f20151d00af1676a7da6a844c Mon Sep 17 00:00:00 2001 From: Angular Robot Date: Wed, 18 Dec 2024 15:41:31 +0000 Subject: [PATCH] build: update all non-major dependencies --- .github/local-actions/branch-manager/main.js | 45 ++++++++++++------- .github/local-actions/labels-sync/main.js | 45 ++++++++++++------- .github/local-actions/lock-closed/main.js | 45 ++++++++++++------- github-actions/branch-manager/main.js | 45 ++++++++++++------- .../commit-message-based-labels/main.js | 45 ++++++++++++------- github-actions/create-pr-for-changes/main.js | 45 ++++++++++++------- github-actions/feature-request/main.js | 45 ++++++++++++------- github-actions/google-internal-tests/main.js | 45 ++++++++++++------- github-actions/org-file-sync/main.js | 45 ++++++++++++------- github-actions/post-approval-changes/main.js | 45 ++++++++++++------- github-actions/unified-status-check/main.js | 45 ++++++++++++------- yarn.lock | 6 +-- 12 files changed, 311 insertions(+), 190 deletions(-) diff --git a/.github/local-actions/branch-manager/main.js b/.github/local-actions/branch-manager/main.js index 6bc264497..63003feba 100644 --- a/.github/local-actions/branch-manager/main.js +++ b/.github/local-actions/branch-manager/main.js @@ -36579,7 +36579,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -36587,7 +36587,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -36603,7 +36603,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -38083,7 +38083,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -38123,7 +38123,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -41479,6 +41479,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -41755,6 +41756,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -45809,7 +45818,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context2) { this.#statusCode = 0; @@ -45863,8 +45872,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -46257,7 +46266,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -47099,9 +47108,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -47204,9 +47215,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION13 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -47241,6 +47252,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION13} ( @@ -53551,11 +53565,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/.github/local-actions/labels-sync/main.js b/.github/local-actions/labels-sync/main.js index 9f27ea0ab..e5433ed75 100644 --- a/.github/local-actions/labels-sync/main.js +++ b/.github/local-actions/labels-sync/main.js @@ -21102,7 +21102,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -21110,7 +21110,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21126,7 +21126,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -22606,7 +22606,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22646,7 +22646,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -26002,6 +26002,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26278,6 +26279,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30332,7 +30341,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context3) { this.#statusCode = 0; @@ -30386,8 +30395,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30780,7 +30789,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31622,9 +31631,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31727,9 +31738,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION13 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31764,6 +31775,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION13} ( @@ -38074,11 +38088,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/.github/local-actions/lock-closed/main.js b/.github/local-actions/lock-closed/main.js index 3efcf92cd..0c5d1475c 100644 --- a/.github/local-actions/lock-closed/main.js +++ b/.github/local-actions/lock-closed/main.js @@ -21102,7 +21102,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -21110,7 +21110,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21126,7 +21126,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -22606,7 +22606,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22646,7 +22646,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -26002,6 +26002,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26278,6 +26279,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30332,7 +30341,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context3) { this.#statusCode = 0; @@ -30386,8 +30395,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30780,7 +30789,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31622,9 +31631,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31727,9 +31738,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION13 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31764,6 +31775,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION13} ( @@ -38074,11 +38088,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/github-actions/branch-manager/main.js b/github-actions/branch-manager/main.js index 76a2505ce..358dd441f 100644 --- a/github-actions/branch-manager/main.js +++ b/github-actions/branch-manager/main.js @@ -21102,7 +21102,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -21110,7 +21110,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21126,7 +21126,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -22606,7 +22606,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22646,7 +22646,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -26002,6 +26002,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26278,6 +26279,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30332,7 +30341,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context3) { this.#statusCode = 0; @@ -30386,8 +30395,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30780,7 +30789,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31622,9 +31631,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31727,9 +31738,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION13 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31764,6 +31775,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION13} ( @@ -38074,11 +38088,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/github-actions/commit-message-based-labels/main.js b/github-actions/commit-message-based-labels/main.js index 16c372527..8f7689108 100644 --- a/github-actions/commit-message-based-labels/main.js +++ b/github-actions/commit-message-based-labels/main.js @@ -21102,7 +21102,7 @@ var require_wrap_handler = __commonJS({ var _a2, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a2 = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a2, statusCode, rawHeaders, socket); } @@ -21110,7 +21110,7 @@ var require_wrap_handler = __commonJS({ var _a2, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a2 = this.#handler).onHeaders) == null ? void 0 : _b.call(_a2, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21126,7 +21126,7 @@ var require_wrap_handler = __commonJS({ var _a2, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a2 = this.#handler).onComplete) == null ? void 0 : _b.call(_a2, rawTrailers); } @@ -22606,7 +22606,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22646,7 +22646,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -26002,6 +26002,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26278,6 +26279,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30332,7 +30341,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context3) { this.#statusCode = 0; @@ -30386,8 +30395,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30780,7 +30789,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31622,9 +31631,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31727,9 +31738,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION13 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31764,6 +31775,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION13} ( @@ -38074,11 +38088,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/github-actions/create-pr-for-changes/main.js b/github-actions/create-pr-for-changes/main.js index d9c6305e7..dac9617c2 100644 --- a/github-actions/create-pr-for-changes/main.js +++ b/github-actions/create-pr-for-changes/main.js @@ -21097,7 +21097,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -21105,7 +21105,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21121,7 +21121,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -22601,7 +22601,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22641,7 +22641,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -25997,6 +25997,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26273,6 +26274,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30327,7 +30336,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context2) { this.#statusCode = 0; @@ -30381,8 +30390,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30775,7 +30784,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31617,9 +31626,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31722,9 +31733,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION9 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31759,6 +31770,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION9} ( @@ -38069,11 +38083,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/github-actions/feature-request/main.js b/github-actions/feature-request/main.js index 189a9a902..756cd2de5 100644 --- a/github-actions/feature-request/main.js +++ b/github-actions/feature-request/main.js @@ -21102,7 +21102,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -21110,7 +21110,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21126,7 +21126,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -22606,7 +22606,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22646,7 +22646,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -26002,6 +26002,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26278,6 +26279,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30332,7 +30341,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context3) { this.#statusCode = 0; @@ -30386,8 +30395,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30780,7 +30789,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31622,9 +31631,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31727,9 +31738,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION13 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31764,6 +31775,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION13} ( @@ -38074,11 +38088,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/github-actions/google-internal-tests/main.js b/github-actions/google-internal-tests/main.js index e8992c461..4cb5e4702 100644 --- a/github-actions/google-internal-tests/main.js +++ b/github-actions/google-internal-tests/main.js @@ -21101,7 +21101,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -21109,7 +21109,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21125,7 +21125,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -22605,7 +22605,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22645,7 +22645,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -26001,6 +26001,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26277,6 +26278,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30331,7 +30340,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context2) { this.#statusCode = 0; @@ -30385,8 +30394,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30779,7 +30788,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31621,9 +31630,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31726,9 +31737,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION9 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31763,6 +31774,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION9} ( @@ -38073,11 +38087,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/github-actions/org-file-sync/main.js b/github-actions/org-file-sync/main.js index d2db4826f..2dedfc970 100644 --- a/github-actions/org-file-sync/main.js +++ b/github-actions/org-file-sync/main.js @@ -21102,7 +21102,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -21110,7 +21110,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21126,7 +21126,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -22606,7 +22606,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22646,7 +22646,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -26002,6 +26002,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26278,6 +26279,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30332,7 +30341,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context3) { this.#statusCode = 0; @@ -30386,8 +30395,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30780,7 +30789,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31622,9 +31631,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31727,9 +31738,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION13 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31764,6 +31775,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION13} ( @@ -38074,11 +38088,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/github-actions/post-approval-changes/main.js b/github-actions/post-approval-changes/main.js index b3b80ae47..f8fef3d0a 100644 --- a/github-actions/post-approval-changes/main.js +++ b/github-actions/post-approval-changes/main.js @@ -21102,7 +21102,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -21110,7 +21110,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21126,7 +21126,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -22606,7 +22606,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22646,7 +22646,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -26002,6 +26002,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26278,6 +26279,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30332,7 +30341,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context3) { this.#statusCode = 0; @@ -30386,8 +30395,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30780,7 +30789,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31622,9 +31631,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31727,9 +31738,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION13 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31764,6 +31775,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION13} ( @@ -38074,11 +38088,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/github-actions/unified-status-check/main.js b/github-actions/unified-status-check/main.js index c3c391cfb..f73a30f26 100644 --- a/github-actions/unified-status-check/main.js +++ b/github-actions/unified-status-check/main.js @@ -21102,7 +21102,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onUpgrade) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, socket); } @@ -21110,7 +21110,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawHeaders = []; for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Buffer.from(val)); + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } if (((_b = (_a = this.#handler).onHeaders) == null ? void 0 : _b.call(_a, statusCode, rawHeaders, () => controller.resume(), statusMessage)) === false) { controller.pause(); @@ -21126,7 +21126,7 @@ var require_wrap_handler = __commonJS({ var _a, _b; const rawTrailers = []; for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Buffer.from(val)); + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); } (_b = (_a = this.#handler).onComplete) == null ? void 0 : _b.call(_a, rawTrailers); } @@ -22606,7 +22606,7 @@ var require_data_url = __commonJS({ if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { return "failure"; } - if (position.position > input.length) { + if (position.position >= input.length) { return "failure"; } position.position++; @@ -22646,7 +22646,7 @@ var require_data_url = __commonJS({ } position.position++; } - if (position.position > input.length) { + if (position.position >= input.length) { break; } let parameterValue = null; @@ -26002,6 +26002,7 @@ var require_client_h2 = __commonJS({ kClosed, kBodyTimeout } = require_symbols6(); + var { channels } = require_diagnostics(); var kOpenStreams = Symbol("open streams"); var extractBody; var http2; @@ -26278,6 +26279,14 @@ var require_client_h2 = __commonJS({ headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request: request2, headers: header, socket: session[kSocket] }); + } const shouldEndStream = method === "GET" || method === "HEAD" || body === null; if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = "100-continue"; @@ -30332,7 +30341,7 @@ var require_response_error = __commonJS({ super(handler2); } #checkContentType(contentType) { - return this.#contentType.indexOf(contentType) === 0; + return (this.#contentType ?? "").indexOf(contentType) === 0; } onRequestStart(controller, context3) { this.#statusCode = 0; @@ -30386,8 +30395,8 @@ var require_response_error = __commonJS({ super.onResponseEnd(controller, trailers); } } - onResponseError(err) { - super.onResponseError(err); + onResponseError(controller, err) { + super.onResponseError(controller, err); } }; module.exports = () => { @@ -30780,7 +30789,7 @@ var require_dns = __commonJS({ servername: origin.hostname, origin: newOrigin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } }; @@ -31622,9 +31631,11 @@ var require_cache3 = __commonJS({ } let headers = { ...opts.headers, - "if-modified-since": new Date(result.cachedAt).toUTCString(), - "if-none-match": result.etag + "if-modified-since": new Date(result.cachedAt).toUTCString() }; + if (result.etag) { + headers["if-none-match"] = result.etag; + } if (result.vary) { headers = { ...headers, @@ -31727,9 +31738,9 @@ var require_cache3 = __commonJS({ var require_sqlite_cache_store = __commonJS({ ""(exports, module) { "use strict"; - var { DatabaseSync } = __require("node:sqlite"); var { Writable } = __require("stream"); var { assertCacheKey, assertCacheValue } = require_cache2(); + var DatabaseSync; var VERSION13 = 3; var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; module.exports = class SqliteCacheStore { @@ -31764,6 +31775,9 @@ var require_sqlite_cache_store = __commonJS({ this.#maxCount = opts.maxCount; } } + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } this.#db = new DatabaseSync((opts == null ? void 0 : opts.location) ?? ":memory:"); this.#db.exec(` CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION13} ( @@ -38074,11 +38088,8 @@ var require_undici2 = __commonJS({ module.exports.cacheStores = { MemoryCacheStore: require_memory_cache_store() }; - try { - const SqliteCacheStore = require_sqlite_cache_store(); - module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; - } catch (err) { - } + var SqliteCacheStore = require_sqlite_cache_store(); + module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; module.exports.buildConnector = buildConnector; module.exports.errors = errors; module.exports.util = { diff --git a/yarn.lock b/yarn.lock index d99422fd3..20f3365fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14904,9 +14904,9 @@ __metadata: linkType: hard "undici@npm:^7.0.0": - version: 7.1.0 - resolution: "undici@npm:7.1.0" - checksum: 10c0/6fd0a63ca5e585128d67324e29cc49c903bf1752fd3b6f318627bb3765326df6f80c02f9c6fb2636ce3934706920c0b7fe4fe8ae19afe0a698f9ffbd7ef57548 + version: 7.1.1 + resolution: "undici@npm:7.1.1" + checksum: 10c0/0bffa25170e863714dee6bf973fc1cec29480d55bb29d3652470d2de78f7b03c18f3155347ec939df493135df7faccfb753e9a5795fe975923994c07faba0014 languageName: node linkType: hard