diff --git a/.github/local-actions/branch-manager/main.js b/.github/local-actions/branch-manager/main.js index bef303f82..ed1e8614b 100644 --- a/.github/local-actions/branch-manager/main.js +++ b/.github/local-actions/branch-manager/main.js @@ -52662,14 +52662,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -62784,7 +62784,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -65127,6 +65127,36 @@ AuthenticatedGitClient._authenticatedInstance = null; // var import_core17 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -65142,7 +65172,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error2 = new RequestError( + const error2 = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/.github/local-actions/changelog/main.js b/.github/local-actions/changelog/main.js index 57386c81a..5afed590b 100644 --- a/.github/local-actions/changelog/main.js +++ b/.github/local-actions/changelog/main.js @@ -37189,14 +37189,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -60973,7 +60973,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -64202,6 +64202,36 @@ AuthenticatedGitClient._authenticatedInstance = null; // var import_core17 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -64217,7 +64247,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error2 = new RequestError( + const error2 = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/.github/local-actions/labels-sync/main.js b/.github/local-actions/labels-sync/main.js index 033a5d666..bbbb8399f 100644 --- a/.github/local-actions/labels-sync/main.js +++ b/.github/local-actions/labels-sync/main.js @@ -37185,14 +37185,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -41491,7 +41491,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -43830,6 +43830,36 @@ var allLabels = { // var import_core2 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -43845,7 +43875,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error = new RequestError( + const error = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/.github/local-actions/lock-closed/main.js b/.github/local-actions/lock-closed/main.js index 8c7a8cab6..ef3112892 100644 --- a/.github/local-actions/lock-closed/main.js +++ b/.github/local-actions/lock-closed/main.js @@ -37185,14 +37185,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -41491,7 +41491,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -43586,6 +43586,36 @@ var Octokit2 = Octokit.plugin(requestLog, legacyRestEndpointMethods, paginateRes // var import_core2 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -43601,7 +43631,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error2 = new RequestError( + const error2 = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/github-actions/branch-manager/main.js b/github-actions/branch-manager/main.js index 1abf5a006..a91460607 100644 --- a/github-actions/branch-manager/main.js +++ b/github-actions/branch-manager/main.js @@ -37185,14 +37185,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -41491,7 +41491,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -43830,6 +43830,36 @@ var allLabels = { // var import_core2 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -43845,7 +43875,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error = new RequestError( + const error = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/github-actions/commit-message-based-labels/main.js b/github-actions/commit-message-based-labels/main.js index 6d8c761f2..b9166cbe8 100644 --- a/github-actions/commit-message-based-labels/main.js +++ b/github-actions/commit-message-based-labels/main.js @@ -37185,14 +37185,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -41894,7 +41894,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -44295,6 +44295,36 @@ var allLabels = { // var import_core2 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -44310,7 +44340,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error2 = new RequestError( + const error2 = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/github-actions/create-pr-for-changes/main.js b/github-actions/create-pr-for-changes/main.js index 60e1f58bd..675499c22 100644 --- a/github-actions/create-pr-for-changes/main.js +++ b/github-actions/create-pr-for-changes/main.js @@ -42649,7 +42649,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { diff --git a/github-actions/feature-request/main.js b/github-actions/feature-request/main.js index 21bedfea7..efd684454 100644 --- a/github-actions/feature-request/main.js +++ b/github-actions/feature-request/main.js @@ -37185,14 +37185,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError4 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError4 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -41494,7 +41494,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -43586,6 +43586,36 @@ var Octokit2 = Octokit.plugin(requestLog, legacyRestEndpointMethods, paginateRes } ); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -43601,7 +43631,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error = new RequestError( + const error = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { @@ -46009,6 +46039,36 @@ var getInputValue = (name, _core = core) => { return num; }; +// +var RequestError3 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // var OctoKit = class { constructor(token, params, options = { readonly: false }) { @@ -46083,7 +46143,7 @@ var OctoKit = class { await this.octokit.issues.getLabel({ ...this.params, name }); return true; } catch (e) { - if (e instanceof RequestError && e.status === 404) { + if (e instanceof RequestError3 && e.status === 404) { return this.options.readonly && this.mockLabels.has(name); } throw e; @@ -46177,7 +46237,7 @@ var OctoKitIssue = class extends OctoKit { name }); } catch (e) { - if (e instanceof RequestError && e.status === 404) { + if (e instanceof RequestError3 && e.status === 404) { log(`Label ${name} not found on issue`); return; } diff --git a/github-actions/google-internal-tests/main.js b/github-actions/google-internal-tests/main.js index 2b80f6c2b..6a9169d29 100644 --- a/github-actions/google-internal-tests/main.js +++ b/github-actions/google-internal-tests/main.js @@ -43283,7 +43283,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { diff --git a/github-actions/org-file-sync/main.js b/github-actions/org-file-sync/main.js index f7e270ef5..83fa13ece 100644 --- a/github-actions/org-file-sync/main.js +++ b/github-actions/org-file-sync/main.js @@ -37185,14 +37185,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -41491,7 +41491,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -43586,6 +43586,36 @@ var Octokit2 = Octokit.plugin(requestLog, legacyRestEndpointMethods, paginateRes // var import_core2 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -43601,7 +43631,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error = new RequestError( + const error = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/github-actions/post-approval-changes/main.js b/github-actions/post-approval-changes/main.js index 241b8b6b1..d5ab3bac6 100644 --- a/github-actions/post-approval-changes/main.js +++ b/github-actions/post-approval-changes/main.js @@ -37185,14 +37185,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -41491,7 +41491,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -43586,6 +43586,36 @@ var Octokit2 = Octokit.plugin(requestLog, legacyRestEndpointMethods, paginateRes // var import_core2 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -43601,7 +43631,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error = new RequestError( + const error = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/github-actions/previews/upload-artifacts-to-firebase/fetch-workflow-artifact.js b/github-actions/previews/upload-artifacts-to-firebase/fetch-workflow-artifact.js index 05941c539..f41ee671a 100644 --- a/github-actions/previews/upload-artifacts-to-firebase/fetch-workflow-artifact.js +++ b/github-actions/previews/upload-artifacts-to-firebase/fetch-workflow-artifact.js @@ -1041,7 +1041,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { diff --git a/github-actions/slash-commands/main.js b/github-actions/slash-commands/main.js index ec565fd48..94fd49323 100644 --- a/github-actions/slash-commands/main.js +++ b/github-actions/slash-commands/main.js @@ -37188,14 +37188,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -54573,7 +54573,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -59137,6 +59137,36 @@ async function rebase(installationClient, installationToken) { // var import_core17 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -59152,7 +59182,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error = new RequestError( + const error = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/github-actions/unified-status-check/main.js b/github-actions/unified-status-check/main.js index 2d485421c..0088580af 100644 --- a/github-actions/unified-status-check/main.js +++ b/github-actions/unified-status-check/main.js @@ -37185,14 +37185,14 @@ var require_dist_node5 = __commonJS({ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var dist_src_exports = {}; __export2(dist_src_exports, { - RequestError: () => RequestError2 + RequestError: () => RequestError3 }); module.exports = __toCommonJS(dist_src_exports); var import_deprecation = require_dist_node4(); var import_once = __toESM2(require_once()); var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); - var RequestError2 = class extends Error { + var RequestError3 = class extends Error { constructor(message, statusCode, options) { super(message); if (Error.captureStackTrace) { @@ -41778,7 +41778,7 @@ function paginateRest(octokit) { paginateRest.VERSION = VERSION6; // -var VERSION7 = "13.2.6"; +var VERSION7 = "13.2.4"; // var Endpoints = { @@ -43873,6 +43873,36 @@ var Octokit2 = Octokit.plugin(requestLog, legacyRestEndpointMethods, paginateRes // var import_core2 = __toESM(require_core()); +// +var RequestError2 = class extends Error { + name; + status; + request; + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +}; + // function requestToOAuthBaseUrl(request2) { const endpointDefaults = request2.endpoint.DEFAULTS; @@ -43888,7 +43918,7 @@ async function oauthRequest(request2, route, parameters) { }; const response = await request2(route, withOAuthParameters); if ("error" in response.data) { - const error = new RequestError( + const error = new RequestError2( `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, 400, { diff --git a/ng-dev/release/publish/test/common.spec.ts b/ng-dev/release/publish/test/common.spec.ts index e4ef6710a..77baa7ae8 100644 --- a/ng-dev/release/publish/test/common.spec.ts +++ b/ng-dev/release/publish/test/common.spec.ts @@ -9,7 +9,6 @@ import {readFileSync, writeFileSync} from 'fs'; import {join} from 'path'; import semver from 'semver'; -import {CancelablePromise} from '@inquirer/type'; import {CommitFromGitLog, parseCommitFromGitLog} from '../../../commit-message/parse.js'; import {GitClient} from '../../../utils/git/git-client.js'; @@ -276,7 +275,7 @@ describe('common release action logic', () => { let promptResolveFn: ((value: boolean) => void) | null = null; const promptPromise = new Promise( (resolve) => (promptResolveFn = resolve), - ) as unknown as CancelablePromise; + ) as unknown as Promise & {cancel: () => void}; promptConfirmSpy.and.returnValue(promptPromise); const testFile = join(testTmpDir, 'some-file.txt'); diff --git a/package.json b/package.json index 06642426a..518cda4d8 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "@google-cloud/firestore": "^7.0.0", "@google-cloud/storage": "^7.0.0", "@inquirer/prompts": "^7.0.0", - "@inquirer/type": "^1.5.0", + "@inquirer/type": "^3.0.0", "@lezer/common": "^1.1.1", "@lezer/highlight": "^1.2.0", "@lezer/javascript": "^1.4.9", diff --git a/yarn.lock b/yarn.lock index e0915b16a..ef78979b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -78,6 +78,30 @@ __metadata: languageName: node linkType: hard +"@angular-devkit/core@npm:18.2.6": + version: 18.2.6 + resolution: "@angular-devkit/core@npm:18.2.6" + dependencies: + ajv: "npm:8.17.1" + ajv-formats: "npm:3.0.1" + jsonc-parser: "npm:3.3.1" + picomatch: "npm:4.0.2" + rxjs: "npm:7.8.1" + source-map: "npm:0.7.4" + peerDependencies: + chokidar: ^3.5.2 + dependenciesMeta: + esbuild: + built: true + puppeteer: + built: true + peerDependenciesMeta: + chokidar: + optional: true + checksum: 10c0/027414c1923f2dc545b301c45d5867cc47659b8087b584d86dab3331bc34a0d3309de743f9beab78f7f92a9f057350848545e4c94bf0b14f683095414c054601 + languageName: node + linkType: hard + "@angular-devkit/core@npm:18.2.7": version: 18.2.7 resolution: "@angular-devkit/core@npm:18.2.7" @@ -126,7 +150,7 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/schematics@npm:18.2.7, @angular-devkit/schematics@npm:^18.0.0": +"@angular-devkit/schematics@npm:18.2.7": version: 18.2.7 resolution: "@angular-devkit/schematics@npm:18.2.7" dependencies: @@ -162,6 +186,24 @@ __metadata: languageName: node linkType: hard +"@angular-devkit/schematics@npm:^18.0.0": + version: 18.2.6 + resolution: "@angular-devkit/schematics@npm:18.2.6" + dependencies: + "@angular-devkit/core": "npm:18.2.6" + jsonc-parser: "npm:3.3.1" + magic-string: "npm:0.30.11" + ora: "npm:5.4.1" + rxjs: "npm:7.8.1" + dependenciesMeta: + esbuild: + built: true + puppeteer: + built: true + checksum: 10c0/4f4ae12896b9e89b1f99dbba0e30e414d4885125906c060144917068f876d847fbadb1195922e431b8822880aa9a1f931f8894dc349691c231134828c1359bc4 + languageName: node + linkType: hard + "@angular/animations@npm:19.0.0-next.8": version: 19.0.0-next.8 resolution: "@angular/animations@npm:19.0.0-next.8" @@ -281,7 +323,7 @@ __metadata: "@google-cloud/firestore": "npm:^7.0.0" "@google-cloud/storage": "npm:^7.0.0" "@inquirer/prompts": "npm:^7.0.0" - "@inquirer/type": "npm:^1.5.0" + "@inquirer/type": "npm:^3.0.0" "@lezer/common": "npm:^1.1.1" "@lezer/highlight": "npm:^1.2.0" "@lezer/javascript": "npm:^1.4.9" @@ -1833,6 +1875,19 @@ __metadata: languageName: node linkType: hard +"@firebase/app-compat@npm:0.2.41": + version: 0.2.41 + resolution: "@firebase/app-compat@npm:0.2.41" + dependencies: + "@firebase/app": "npm:0.10.11" + "@firebase/component": "npm:0.6.9" + "@firebase/logger": "npm:0.4.2" + "@firebase/util": "npm:1.10.0" + tslib: "npm:^2.1.0" + checksum: 10c0/9873ebc40871182e2ca4948aeef99c56b592c14e3a3c242239a781ec8e5fdefe7dbc50cf73a9733ed6aed778aa8e9bbd8cd631b8f31a1493e24648fd30fdf329 + languageName: node + linkType: hard + "@firebase/app-compat@npm:0.2.42": version: 0.2.42 resolution: "@firebase/app-compat@npm:0.2.42" @@ -1853,6 +1908,19 @@ __metadata: languageName: node linkType: hard +"@firebase/app@npm:0.10.11": + version: 0.10.11 + resolution: "@firebase/app@npm:0.10.11" + dependencies: + "@firebase/component": "npm:0.6.9" + "@firebase/logger": "npm:0.4.2" + "@firebase/util": "npm:1.10.0" + idb: "npm:7.1.1" + tslib: "npm:^2.1.0" + checksum: 10c0/217516e7fb5f64fd8fc4932944a6c1e7fb10bc8dbc05f93787539b25174ea75cfbd3a0b5e820ac57f5536c70f12da55ae680d98089c54ad9ba792f158a00c353 + languageName: node + linkType: hard + "@firebase/app@npm:0.10.12": version: 0.10.12 resolution: "@firebase/app@npm:0.10.12" @@ -1982,6 +2050,21 @@ __metadata: languageName: node linkType: hard +"@firebase/firestore-compat@npm:0.3.37": + version: 0.3.37 + resolution: "@firebase/firestore-compat@npm:0.3.37" + dependencies: + "@firebase/component": "npm:0.6.9" + "@firebase/firestore": "npm:4.7.2" + "@firebase/firestore-types": "npm:3.0.2" + "@firebase/util": "npm:1.10.0" + tslib: "npm:^2.1.0" + peerDependencies: + "@firebase/app-compat": 0.x + checksum: 10c0/3b4250074ea55080b7733597119abe1dab46e030a742915bc4f4267a3ad20309cb5445d827e0ce71d0adef2055ac0878540910e66b36b69083028190f664eb51 + languageName: node + linkType: hard + "@firebase/firestore-compat@npm:0.3.38": version: 0.3.38 resolution: "@firebase/firestore-compat@npm:0.3.38" @@ -2007,6 +2090,24 @@ __metadata: languageName: node linkType: hard +"@firebase/firestore@npm:4.7.2": + version: 4.7.2 + resolution: "@firebase/firestore@npm:4.7.2" + dependencies: + "@firebase/component": "npm:0.6.9" + "@firebase/logger": "npm:0.4.2" + "@firebase/util": "npm:1.10.0" + "@firebase/webchannel-wrapper": "npm:1.0.1" + "@grpc/grpc-js": "npm:~1.9.0" + "@grpc/proto-loader": "npm:^0.7.8" + tslib: "npm:^2.1.0" + undici: "npm:6.19.7" + peerDependencies: + "@firebase/app": 0.x + checksum: 10c0/59e35106cc8db1d8f2ebe61a794b3bb9c49db2b577ce72fda3595020b27167d11611c7fe28a5c8d3cf7cfb2dab8e26607194898979ae31b219e214a81fcada9c + languageName: node + linkType: hard + "@firebase/firestore@npm:4.7.3": version: 4.7.3 resolution: "@firebase/firestore@npm:4.7.3" @@ -2582,14 +2683,7 @@ __metadata: languageName: node linkType: hard -"@inquirer/figures@npm:^1.0.6": - version: 1.0.7 - resolution: "@inquirer/figures@npm:1.0.7" - checksum: 10c0/d7b4cfcd38dd43d1ac79da52c4478aa89145207004a471aa2083856f1d9b99adef45563f09d66c09d6457b09200fcf784527804b70ad3bd517cbc5e11142c2df - languageName: node - linkType: hard - -"@inquirer/figures@npm:^1.0.7": +"@inquirer/figures@npm:^1.0.6, @inquirer/figures@npm:^1.0.7": version: 1.0.7 resolution: "@inquirer/figures@npm:1.0.7" checksum: 10c0/d7b4cfcd38dd43d1ac79da52c4478aa89145207004a471aa2083856f1d9b99adef45563f09d66c09d6457b09200fcf784527804b70ad3bd517cbc5e11142c2df @@ -2766,7 +2860,7 @@ __metadata: languageName: node linkType: hard -"@inquirer/type@npm:^1.5.0, @inquirer/type@npm:^1.5.5": +"@inquirer/type@npm:^1.5.5": version: 1.5.5 resolution: "@inquirer/type@npm:1.5.5" dependencies: @@ -3611,7 +3705,7 @@ __metadata: languageName: node linkType: hard -"@octokit/plugin-paginate-rest@npm:11.3.5, @octokit/plugin-paginate-rest@npm:^11.0.0": +"@octokit/plugin-paginate-rest@npm:11.3.5": version: 11.3.5 resolution: "@octokit/plugin-paginate-rest@npm:11.3.5" dependencies: @@ -3622,6 +3716,17 @@ __metadata: languageName: node linkType: hard +"@octokit/plugin-paginate-rest@npm:^11.0.0": + version: 11.3.3 + resolution: "@octokit/plugin-paginate-rest@npm:11.3.3" + dependencies: + "@octokit/types": "npm:^13.5.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10c0/f1fd41e0ae47d6813d283e0e4ab89f4a9d55dbc8ec1a44b5bb00355007e5260db124a10f94b34a86b0305a1adda61c35cd57c0914c7c093c05f93199be87459e + languageName: node + linkType: hard + "@octokit/plugin-paginate-rest@npm:^9.0.0": version: 9.2.1 resolution: "@octokit/plugin-paginate-rest@npm:9.2.1" @@ -3642,7 +3747,7 @@ __metadata: languageName: node linkType: hard -"@octokit/plugin-rest-endpoint-methods@npm:13.2.6, @octokit/plugin-rest-endpoint-methods@npm:^13.0.0": +"@octokit/plugin-rest-endpoint-methods@npm:13.2.6": version: 13.2.6 resolution: "@octokit/plugin-rest-endpoint-methods@npm:13.2.6" dependencies: @@ -3664,7 +3769,18 @@ __metadata: languageName: node linkType: hard -"@octokit/request-error@npm:6.1.5, @octokit/request-error@npm:^6.0.1, @octokit/request-error@npm:^6.1.0, @octokit/request-error@npm:^6.1.1": +"@octokit/plugin-rest-endpoint-methods@npm:^13.0.0": + version: 13.2.4 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:13.2.4" + dependencies: + "@octokit/types": "npm:^13.5.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10c0/7a63b37bb1eb9972e3cc2cf6e6b53ad5c14152767420a7f9ec4ccf2557b411fd0df442cf98866fa09ebbd39f1e69b688730feaf3cfd4056713e73a33c40ed04f + languageName: node + linkType: hard + +"@octokit/request-error@npm:6.1.5": version: 6.1.5 resolution: "@octokit/request-error@npm:6.1.5" dependencies: @@ -3684,6 +3800,15 @@ __metadata: languageName: node linkType: hard +"@octokit/request-error@npm:^6.0.1, @octokit/request-error@npm:^6.1.0, @octokit/request-error@npm:^6.1.1": + version: 6.1.4 + resolution: "@octokit/request-error@npm:6.1.4" + dependencies: + "@octokit/types": "npm:^13.0.0" + checksum: 10c0/899668b1cd012642fc6a42184cc14b9767de15534b66722a40327fd6ef1c7b050003a7a5ecbc61b0d1f33ceae8dc7b196c941a2397e5f7cc540aa6149ef1f730 + languageName: node + linkType: hard + "@octokit/request@npm:^8.3.0, @octokit/request@npm:^8.3.1": version: 8.4.0 resolution: "@octokit/request@npm:8.4.0" @@ -3720,7 +3845,7 @@ __metadata: languageName: node linkType: hard -"@octokit/types@npm:13.6.1, @octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0, @octokit/types@npm:^13.4.1, @octokit/types@npm:^13.6.0, @octokit/types@npm:^13.6.1": +"@octokit/types@npm:13.6.1, @octokit/types@npm:^13.6.1": version: 13.6.1 resolution: "@octokit/types@npm:13.6.1" dependencies: @@ -3738,6 +3863,15 @@ __metadata: languageName: node linkType: hard +"@octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0, @octokit/types@npm:^13.4.1, @octokit/types@npm:^13.5.0, @octokit/types@npm:^13.6.0": + version: 13.6.0 + resolution: "@octokit/types@npm:13.6.0" + dependencies: + "@octokit/openapi-types": "npm:^22.2.0" + checksum: 10c0/883315e7681b4dc8c5d47fb039a35ff0578da362872121c313c8a8d349a85f0793690b02f9f2be1068dcf7897f3b1dd0ed630b67e143d8a0f47e435497bca244 + languageName: node + linkType: hard + "@octokit/webhooks-definitions@npm:3.67.3": version: 3.67.3 resolution: "@octokit/webhooks-definitions@npm:3.67.3" @@ -8276,7 +8410,7 @@ __metadata: languageName: node linkType: hard -"firebase@npm:10.14.0, firebase@npm:^10.12.0": +"firebase@npm:10.14.0": version: 10.14.0 resolution: "firebase@npm:10.14.0" dependencies: @@ -8312,6 +8446,41 @@ __metadata: languageName: node linkType: hard +"firebase@npm:^10.12.0": + version: 10.13.2 + resolution: "firebase@npm:10.13.2" + dependencies: + "@firebase/analytics": "npm:0.10.8" + "@firebase/analytics-compat": "npm:0.2.14" + "@firebase/app": "npm:0.10.11" + "@firebase/app-check": "npm:0.8.8" + "@firebase/app-check-compat": "npm:0.3.15" + "@firebase/app-compat": "npm:0.2.41" + "@firebase/app-types": "npm:0.9.2" + "@firebase/auth": "npm:1.7.9" + "@firebase/auth-compat": "npm:0.5.14" + "@firebase/database": "npm:1.0.8" + "@firebase/database-compat": "npm:1.0.8" + "@firebase/firestore": "npm:4.7.2" + "@firebase/firestore-compat": "npm:0.3.37" + "@firebase/functions": "npm:0.11.8" + "@firebase/functions-compat": "npm:0.3.14" + "@firebase/installations": "npm:0.6.9" + "@firebase/installations-compat": "npm:0.2.9" + "@firebase/messaging": "npm:0.12.11" + "@firebase/messaging-compat": "npm:0.2.11" + "@firebase/performance": "npm:0.6.9" + "@firebase/performance-compat": "npm:0.2.9" + "@firebase/remote-config": "npm:0.4.9" + "@firebase/remote-config-compat": "npm:0.2.9" + "@firebase/storage": "npm:0.13.2" + "@firebase/storage-compat": "npm:0.3.12" + "@firebase/util": "npm:1.10.0" + "@firebase/vertexai-preview": "npm:0.0.4" + checksum: 10c0/3e98c729e4cea8da83b26060fc3e7d93bc86474da1a0c9dc56b22f16eb3b027c8cf2a37ab324517996934c0452825a0708edd5b651828fc96fbe69fb629e9e58 + languageName: node + linkType: hard + "flat-cache@npm:^5.0.0": version: 5.0.0 resolution: "flat-cache@npm:5.0.0"