Skip to content

Commit b237b4f

Browse files
committed
dist: build new artifacts
Signed-off-by: Nico Korthout <korthout@users.noreply.github.com>
1 parent 74fef49 commit b237b4f

3 files changed

Lines changed: 54 additions & 91 deletions

File tree

dist/index.js

Lines changed: 53 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -6324,7 +6324,7 @@ module.exports = __toCommonJS(dist_src_exports);
63246324
var 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
63306330
var 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);
63566368
function 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;
64216433
function removeNonChars(variableName) {
6422-
return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
6434+
return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
64236435
}
64246436
function extractUrlVariableNames(url) {
64256437
const matches = url.match(urlVariableRegex);
@@ -6431,10 +6443,13 @@ function extractUrlVariableNames(url) {
64316443

64326444
// pkg/dist-src/util/omit.js
64336445
function 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);
94609475
var 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);
94679494
var 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
94759502
function 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) {
95829610
async 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) {
95929620
function 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
1033310367
module.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:

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/licenses.txt

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -769,31 +769,6 @@ Apache-2.0
769769
limitations under the License.
770770

771771

772-
is-plain-object
773-
MIT
774-
The MIT License (MIT)
775-
776-
Copyright (c) 2014-2017, Jon Schlinkert.
777-
778-
Permission is hereby granted, free of charge, to any person obtaining a copy
779-
of this software and associated documentation files (the "Software"), to deal
780-
in the Software without restriction, including without limitation the rights
781-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
782-
copies of the Software, and to permit persons to whom the Software is
783-
furnished to do so, subject to the following conditions:
784-
785-
The above copyright notice and this permission notice shall be included in
786-
all copies or substantial portions of the Software.
787-
788-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
789-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
790-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
791-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
792-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
793-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
794-
THE SOFTWARE.
795-
796-
797772
is-stream
798773
MIT
799774
MIT License

0 commit comments

Comments
 (0)