@@ -6324,7 +6324,7 @@ module.exports = __toCommonJS(dist_src_exports);
63246324var import_universal_user_agent = __nccwpck_require__(3843);
63256325
63266326// pkg/dist-src/version.js
6327- var VERSION = "9.0.2 ";
6327+ var VERSION = "9.0.6 ";
63286328
63296329// pkg/dist-src/defaults.js
63306330var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
@@ -6351,12 +6351,24 @@ function lowercaseKeys(object) {
63516351 }, {});
63526352}
63536353
6354+ // pkg/dist-src/util/is-plain-object.js
6355+ function isPlainObject(value) {
6356+ if (typeof value !== "object" || value === null)
6357+ return false;
6358+ if (Object.prototype.toString.call(value) !== "[object Object]")
6359+ return false;
6360+ const proto = Object.getPrototypeOf(value);
6361+ if (proto === null)
6362+ return true;
6363+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
6364+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
6365+ }
6366+
63546367// pkg/dist-src/util/merge-deep.js
6355- var import_is_plain_object = __nccwpck_require__(3407);
63566368function mergeDeep(defaults, options) {
63576369 const result = Object.assign({}, defaults);
63586370 Object.keys(options).forEach((key) => {
6359- if ((0, import_is_plain_object. isPlainObject) (options[key])) {
6371+ if (isPlainObject(options[key])) {
63606372 if (!(key in defaults))
63616373 Object.assign(result, { [key]: options[key] });
63626374 else
@@ -6417,9 +6429,9 @@ function addQueryParameters(url, parameters) {
64176429}
64186430
64196431// pkg/dist-src/util/extract-url-variable-names.js
6420- var urlVariableRegex = /\{[^}]+\}/g;
6432+ var urlVariableRegex = /\{[^{} }]+\}/g;
64216433function removeNonChars(variableName) {
6422- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
6434+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
64236435}
64246436function extractUrlVariableNames(url) {
64256437 const matches = url.match(urlVariableRegex);
@@ -6431,10 +6443,13 @@ function extractUrlVariableNames(url) {
64316443
64326444// pkg/dist-src/util/omit.js
64336445function omit(object, keysToOmit) {
6434- return Object.keys(object).filter((option) => !keysToOmit.includes(option)).reduce((obj, key) => {
6435- obj[key] = object[key];
6436- return obj;
6437- }, {});
6446+ const result = { __proto__: null };
6447+ for (const key of Object.keys(object)) {
6448+ if (keysToOmit.indexOf(key) === -1) {
6449+ result[key] = object[key];
6450+ }
6451+ }
6452+ return result;
64386453}
64396454
64406455// pkg/dist-src/util/url-template.js
@@ -6602,7 +6617,7 @@ function parse(options) {
66026617 }
66036618 if (url.endsWith("/graphql")) {
66046619 if (options.mediaType.previews?.length) {
6605- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
6620+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
66066621 headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
66076622 const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
66086623 return `application/vnd.github.${preview}-preview${format}`;
@@ -9460,10 +9475,22 @@ var import_endpoint = __nccwpck_require__(4471);
94609475var import_universal_user_agent = __nccwpck_require__(3843);
94619476
94629477// pkg/dist-src/version.js
9463- var VERSION = "8.1.4";
9478+ var VERSION = "8.4.1";
9479+
9480+ // pkg/dist-src/is-plain-object.js
9481+ function isPlainObject(value) {
9482+ if (typeof value !== "object" || value === null)
9483+ return false;
9484+ if (Object.prototype.toString.call(value) !== "[object Object]")
9485+ return false;
9486+ const proto = Object.getPrototypeOf(value);
9487+ if (proto === null)
9488+ return true;
9489+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
9490+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
9491+ }
94649492
94659493// pkg/dist-src/fetch-wrapper.js
9466- var import_is_plain_object = __nccwpck_require__(3407);
94679494var import_request_error = __nccwpck_require__(3708);
94689495
94699496// pkg/dist-src/get-buffer-response.js
@@ -9473,10 +9500,10 @@ function getBufferResponse(response) {
94739500
94749501// pkg/dist-src/fetch-wrapper.js
94759502function fetchWrapper(requestOptions) {
9476- var _a, _b, _c;
9503+ var _a, _b, _c, _d ;
94779504 const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
94789505 const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
9479- if ((0, import_is_plain_object. isPlainObject) (requestOptions.body) || Array.isArray(requestOptions.body)) {
9506+ if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
94809507 requestOptions.body = JSON.stringify(requestOptions.body);
94819508 }
94829509 let headers = {};
@@ -9494,8 +9521,9 @@ function fetchWrapper(requestOptions) {
94949521 return fetch(requestOptions.url, {
94959522 method: requestOptions.method,
94969523 body: requestOptions.body,
9524+ redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,
94979525 headers: requestOptions.headers,
9498- signal: (_c = requestOptions.request) == null ? void 0 : _c .signal,
9526+ signal: (_d = requestOptions.request) == null ? void 0 : _d .signal,
94999527 // duplex must be set if request.body is ReadableStream or Async Iterables.
95009528 // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
95019529 ...requestOptions.body && { duplex: "half" }
@@ -9506,7 +9534,7 @@ function fetchWrapper(requestOptions) {
95069534 headers[keyAndValue[0]] = keyAndValue[1];
95079535 }
95089536 if ("deprecation" in headers) {
9509- const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
9537+ const matches = headers.link && headers.link.match(/<([^< >]+)>; rel="deprecation"/);
95109538 const deprecationLink = matches && matches.pop();
95119539 log.warn(
95129540 `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
@@ -9582,7 +9610,7 @@ function fetchWrapper(requestOptions) {
95829610async function getResponseData(response) {
95839611 const contentType = response.headers.get("content-type");
95849612 if (/application\/json/.test(contentType)) {
9585- return response.json();
9613+ return response.json().catch(() => response.text()).catch(() => "") ;
95869614 }
95879615 if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
95889616 return response.text();
@@ -9592,11 +9620,17 @@ async function getResponseData(response) {
95929620function toErrorMessage(data) {
95939621 if (typeof data === "string")
95949622 return data;
9623+ let suffix;
9624+ if ("documentation_url" in data) {
9625+ suffix = ` - ${data.documentation_url}`;
9626+ } else {
9627+ suffix = "";
9628+ }
95959629 if ("message" in data) {
95969630 if (Array.isArray(data.errors)) {
9597- return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
9631+ return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix} `;
95989632 }
9599- return data.message;
9633+ return `${ data.message}${suffix}` ;
96009634 }
96019635 return `Unknown error: ${JSON.stringify(data)}`;
96029636}
@@ -10333,52 +10367,6 @@ module.exports.array = (stream, options) => getStream(stream, {...options, array
1033310367module.exports.MaxBufferError = MaxBufferError;
1033410368
1033510369
10336- /***/ }),
10337-
10338- /***/ 3407:
10339- /***/ ((__unused_webpack_module, exports) => {
10340-
10341- "use strict";
10342-
10343-
10344- Object.defineProperty(exports, "__esModule", ({ value: true }));
10345-
10346- /*!
10347- * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
10348- *
10349- * Copyright (c) 2014-2017, Jon Schlinkert.
10350- * Released under the MIT License.
10351- */
10352-
10353- function isObject(o) {
10354- return Object.prototype.toString.call(o) === '[object Object]';
10355- }
10356-
10357- function isPlainObject(o) {
10358- var ctor,prot;
10359-
10360- if (isObject(o) === false) return false;
10361-
10362- // If has modified constructor
10363- ctor = o.constructor;
10364- if (ctor === undefined) return true;
10365-
10366- // If has modified prototype
10367- prot = ctor.prototype;
10368- if (isObject(prot) === false) return false;
10369-
10370- // If constructor does not have an Object-specific method
10371- if (prot.hasOwnProperty('isPrototypeOf') === false) {
10372- return false;
10373- }
10374-
10375- // Most likely a plain Object
10376- return true;
10377- }
10378-
10379- exports.isPlainObject = isPlainObject;
10380-
10381-
1038210370/***/ }),
1038310371
1038410372/***/ 2940:
0 commit comments