@@ -3935,7 +3935,7 @@ module.exports = __toCommonJS(dist_src_exports);
39353935var import_universal_user_agent = __nccwpck_require__(5030);
39363936
39373937// pkg/dist-src/version.js
3938- var VERSION = "9.0.3 ";
3938+ var VERSION = "9.0.6 ";
39393939
39403940// pkg/dist-src/defaults.js
39413941var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
@@ -4040,9 +4040,9 @@ function addQueryParameters(url, parameters) {
40404040}
40414041
40424042// pkg/dist-src/util/extract-url-variable-names.js
4043- var urlVariableRegex = /\{[^}]+\}/g;
4043+ var urlVariableRegex = /\{[^{} }]+\}/g;
40444044function removeNonChars(variableName) {
4045- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
4045+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
40464046}
40474047function extractUrlVariableNames(url) {
40484048 const matches = url.match(urlVariableRegex);
@@ -4054,10 +4054,13 @@ function extractUrlVariableNames(url) {
40544054
40554055// pkg/dist-src/util/omit.js
40564056function omit(object, keysToOmit) {
4057- return Object.keys(object).filter((option) => !keysToOmit.includes(option)).reduce((obj, key) => {
4058- obj[key] = object[key];
4059- return obj;
4060- }, {});
4057+ const result = { __proto__: null };
4058+ for (const key of Object.keys(object)) {
4059+ if (keysToOmit.indexOf(key) === -1) {
4060+ result[key] = object[key];
4061+ }
4062+ }
4063+ return result;
40614064}
40624065
40634066// pkg/dist-src/util/url-template.js
@@ -4225,7 +4228,7 @@ function parse(options) {
42254228 }
42264229 if (url.endsWith("/graphql")) {
42274230 if (options.mediaType.previews?.length) {
4228- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
4231+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
42294232 headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
42304233 const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
42314234 return `application/vnd.github.${preview}-preview${format}`;
@@ -7081,7 +7084,7 @@ var import_endpoint = __nccwpck_require__(9440);
70817084var import_universal_user_agent = __nccwpck_require__(5030);
70827085
70837086// pkg/dist-src/version.js
7084- var VERSION = "8.1.6 ";
7087+ var VERSION = "8.4.1 ";
70857088
70867089// pkg/dist-src/is-plain-object.js
70877090function isPlainObject(value) {
@@ -7106,7 +7109,7 @@ function getBufferResponse(response) {
71067109
71077110// pkg/dist-src/fetch-wrapper.js
71087111function fetchWrapper(requestOptions) {
7109- var _a, _b, _c;
7112+ var _a, _b, _c, _d ;
71107113 const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
71117114 const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
71127115 if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
@@ -7127,8 +7130,9 @@ function fetchWrapper(requestOptions) {
71277130 return fetch(requestOptions.url, {
71287131 method: requestOptions.method,
71297132 body: requestOptions.body,
7133+ redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,
71307134 headers: requestOptions.headers,
7131- signal: (_c = requestOptions.request) == null ? void 0 : _c .signal,
7135+ signal: (_d = requestOptions.request) == null ? void 0 : _d .signal,
71327136 // duplex must be set if request.body is ReadableStream or Async Iterables.
71337137 // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
71347138 ...requestOptions.body && { duplex: "half" }
@@ -7139,7 +7143,7 @@ function fetchWrapper(requestOptions) {
71397143 headers[keyAndValue[0]] = keyAndValue[1];
71407144 }
71417145 if ("deprecation" in headers) {
7142- const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
7146+ const matches = headers.link && headers.link.match(/<([^< >]+)>; rel="deprecation"/);
71437147 const deprecationLink = matches && matches.pop();
71447148 log.warn(
71457149 `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
@@ -7225,11 +7229,17 @@ async function getResponseData(response) {
72257229function toErrorMessage(data) {
72267230 if (typeof data === "string")
72277231 return data;
7232+ let suffix;
7233+ if ("documentation_url" in data) {
7234+ suffix = ` - ${data.documentation_url}`;
7235+ } else {
7236+ suffix = "";
7237+ }
72287238 if ("message" in data) {
72297239 if (Array.isArray(data.errors)) {
7230- return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
7240+ return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix} `;
72317241 }
7232- return data.message;
7242+ return `${ data.message}${suffix}` ;
72337243 }
72347244 return `Unknown error: ${JSON.stringify(data)}`;
72357245}
0 commit comments