@@ -6372,7 +6372,7 @@ module.exports = __toCommonJS(dist_src_exports);
63726372var import_universal_user_agent = __nccwpck_require__(3843);
63736373
63746374// pkg/dist-src/version.js
6375- var VERSION = "9.0.2 ";
6375+ var VERSION = "9.0.6 ";
63766376
63776377// pkg/dist-src/defaults.js
63786378var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
@@ -6399,12 +6399,24 @@ function lowercaseKeys(object) {
63996399 }, {});
64006400}
64016401
6402+ // pkg/dist-src/util/is-plain-object.js
6403+ function isPlainObject(value) {
6404+ if (typeof value !== "object" || value === null)
6405+ return false;
6406+ if (Object.prototype.toString.call(value) !== "[object Object]")
6407+ return false;
6408+ const proto = Object.getPrototypeOf(value);
6409+ if (proto === null)
6410+ return true;
6411+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
6412+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
6413+ }
6414+
64026415// pkg/dist-src/util/merge-deep.js
6403- var import_is_plain_object = __nccwpck_require__(3407);
64046416function mergeDeep(defaults, options) {
64056417 const result = Object.assign({}, defaults);
64066418 Object.keys(options).forEach((key) => {
6407- if ((0, import_is_plain_object. isPlainObject) (options[key])) {
6419+ if (isPlainObject(options[key])) {
64086420 if (!(key in defaults))
64096421 Object.assign(result, { [key]: options[key] });
64106422 else
@@ -6465,9 +6477,9 @@ function addQueryParameters(url, parameters) {
64656477}
64666478
64676479// pkg/dist-src/util/extract-url-variable-names.js
6468- var urlVariableRegex = /\{[^}]+\}/g;
6480+ var urlVariableRegex = /\{[^{} }]+\}/g;
64696481function removeNonChars(variableName) {
6470- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
6482+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
64716483}
64726484function extractUrlVariableNames(url) {
64736485 const matches = url.match(urlVariableRegex);
@@ -6479,10 +6491,13 @@ function extractUrlVariableNames(url) {
64796491
64806492// pkg/dist-src/util/omit.js
64816493function omit(object, keysToOmit) {
6482- return Object.keys(object).filter((option) => !keysToOmit.includes(option)).reduce((obj, key) => {
6483- obj[key] = object[key];
6484- return obj;
6485- }, {});
6494+ const result = { __proto__: null };
6495+ for (const key of Object.keys(object)) {
6496+ if (keysToOmit.indexOf(key) === -1) {
6497+ result[key] = object[key];
6498+ }
6499+ }
6500+ return result;
64866501}
64876502
64886503// pkg/dist-src/util/url-template.js
@@ -6650,7 +6665,7 @@ function parse(options) {
66506665 }
66516666 if (url.endsWith("/graphql")) {
66526667 if (options.mediaType.previews?.length) {
6653- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
6668+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
66546669 headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
66556670 const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
66566671 return `application/vnd.github.${preview}-preview${format}`;
@@ -9508,10 +9523,22 @@ var import_endpoint = __nccwpck_require__(4471);
95089523var import_universal_user_agent = __nccwpck_require__(3843);
95099524
95109525// pkg/dist-src/version.js
9511- var VERSION = "8.1.4";
9526+ var VERSION = "8.4.1";
9527+
9528+ // pkg/dist-src/is-plain-object.js
9529+ function isPlainObject(value) {
9530+ if (typeof value !== "object" || value === null)
9531+ return false;
9532+ if (Object.prototype.toString.call(value) !== "[object Object]")
9533+ return false;
9534+ const proto = Object.getPrototypeOf(value);
9535+ if (proto === null)
9536+ return true;
9537+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
9538+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
9539+ }
95129540
95139541// pkg/dist-src/fetch-wrapper.js
9514- var import_is_plain_object = __nccwpck_require__(3407);
95159542var import_request_error = __nccwpck_require__(3708);
95169543
95179544// pkg/dist-src/get-buffer-response.js
@@ -9521,10 +9548,10 @@ function getBufferResponse(response) {
95219548
95229549// pkg/dist-src/fetch-wrapper.js
95239550function fetchWrapper(requestOptions) {
9524- var _a, _b, _c;
9551+ var _a, _b, _c, _d ;
95259552 const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
95269553 const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
9527- if ((0, import_is_plain_object. isPlainObject) (requestOptions.body) || Array.isArray(requestOptions.body)) {
9554+ if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
95289555 requestOptions.body = JSON.stringify(requestOptions.body);
95299556 }
95309557 let headers = {};
@@ -9542,8 +9569,9 @@ function fetchWrapper(requestOptions) {
95429569 return fetch(requestOptions.url, {
95439570 method: requestOptions.method,
95449571 body: requestOptions.body,
9572+ redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,
95459573 headers: requestOptions.headers,
9546- signal: (_c = requestOptions.request) == null ? void 0 : _c .signal,
9574+ signal: (_d = requestOptions.request) == null ? void 0 : _d .signal,
95479575 // duplex must be set if request.body is ReadableStream or Async Iterables.
95489576 // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
95499577 ...requestOptions.body && { duplex: "half" }
@@ -9554,7 +9582,7 @@ function fetchWrapper(requestOptions) {
95549582 headers[keyAndValue[0]] = keyAndValue[1];
95559583 }
95569584 if ("deprecation" in headers) {
9557- const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
9585+ const matches = headers.link && headers.link.match(/<([^< >]+)>; rel="deprecation"/);
95589586 const deprecationLink = matches && matches.pop();
95599587 log.warn(
95609588 `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
@@ -9630,7 +9658,7 @@ function fetchWrapper(requestOptions) {
96309658async function getResponseData(response) {
96319659 const contentType = response.headers.get("content-type");
96329660 if (/application\/json/.test(contentType)) {
9633- return response.json();
9661+ return response.json().catch(() => response.text()).catch(() => "") ;
96349662 }
96359663 if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
96369664 return response.text();
@@ -9640,11 +9668,17 @@ async function getResponseData(response) {
96409668function toErrorMessage(data) {
96419669 if (typeof data === "string")
96429670 return data;
9671+ let suffix;
9672+ if ("documentation_url" in data) {
9673+ suffix = ` - ${data.documentation_url}`;
9674+ } else {
9675+ suffix = "";
9676+ }
96439677 if ("message" in data) {
96449678 if (Array.isArray(data.errors)) {
9645- return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
9679+ return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix} `;
96469680 }
9647- return data.message;
9681+ return `${ data.message}${suffix}` ;
96489682 }
96499683 return `Unknown error: ${JSON.stringify(data)}`;
96509684}
@@ -10381,52 +10415,6 @@ module.exports.array = (stream, options) => getStream(stream, {...options, array
1038110415module.exports.MaxBufferError = MaxBufferError;
1038210416
1038310417
10384- /***/ }),
10385-
10386- /***/ 3407:
10387- /***/ ((__unused_webpack_module, exports) => {
10388-
10389- "use strict";
10390-
10391-
10392- Object.defineProperty(exports, "__esModule", ({ value: true }));
10393-
10394- /*!
10395- * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
10396- *
10397- * Copyright (c) 2014-2017, Jon Schlinkert.
10398- * Released under the MIT License.
10399- */
10400-
10401- function isObject(o) {
10402- return Object.prototype.toString.call(o) === '[object Object]';
10403- }
10404-
10405- function isPlainObject(o) {
10406- var ctor,prot;
10407-
10408- if (isObject(o) === false) return false;
10409-
10410- // If has modified constructor
10411- ctor = o.constructor;
10412- if (ctor === undefined) return true;
10413-
10414- // If has modified prototype
10415- prot = ctor.prototype;
10416- if (isObject(prot) === false) return false;
10417-
10418- // If constructor does not have an Object-specific method
10419- if (prot.hasOwnProperty('isPrototypeOf') === false) {
10420- return false;
10421- }
10422-
10423- // Most likely a plain Object
10424- return true;
10425- }
10426-
10427- exports.isPlainObject = isPlainObject;
10428-
10429-
1043010418/***/ }),
1043110419
1043210420/***/ 2940:
0 commit comments