build: update distribution (#3603)
This commit is contained in:
parent
e6be09381a
commit
c6a952094d
223
dist/index.js
vendored
223
dist/index.js
vendored
@ -31779,6 +31779,184 @@ function parseParams (str) {
|
|||||||
module.exports = parseParams
|
module.exports = parseParams
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 8739:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
var __webpack_unused_export__;
|
||||||
|
|
||||||
|
|
||||||
|
const NullObject = function NullObject () { }
|
||||||
|
NullObject.prototype = Object.create(null)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
|
||||||
|
*
|
||||||
|
* parameter = token "=" ( token / quoted-string )
|
||||||
|
* token = 1*tchar
|
||||||
|
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
|
||||||
|
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
|
||||||
|
* / DIGIT / ALPHA
|
||||||
|
* ; any VCHAR, except delimiters
|
||||||
|
* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
|
||||||
|
* qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
|
||||||
|
* obs-text = %x80-FF
|
||||||
|
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
||||||
|
*/
|
||||||
|
const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RegExp to match quoted-pair in RFC 7230 sec 3.2.6
|
||||||
|
*
|
||||||
|
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
||||||
|
* obs-text = %x80-FF
|
||||||
|
*/
|
||||||
|
const quotedPairRE = /\\([\v\u0020-\u00ff])/gu
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RegExp to match type in RFC 7231 sec 3.1.1.1
|
||||||
|
*
|
||||||
|
* media-type = type "/" subtype
|
||||||
|
* type = token
|
||||||
|
* subtype = token
|
||||||
|
*/
|
||||||
|
const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u
|
||||||
|
|
||||||
|
// default ContentType to prevent repeated object creation
|
||||||
|
const defaultContentType = { type: '', parameters: new NullObject() }
|
||||||
|
Object.freeze(defaultContentType.parameters)
|
||||||
|
Object.freeze(defaultContentType)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse media type to object.
|
||||||
|
*
|
||||||
|
* @param {string|object} header
|
||||||
|
* @return {Object}
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
|
||||||
|
function parse (header) {
|
||||||
|
if (typeof header !== 'string') {
|
||||||
|
throw new TypeError('argument header is required and must be a string')
|
||||||
|
}
|
||||||
|
|
||||||
|
let index = header.indexOf(';')
|
||||||
|
const type = index !== -1
|
||||||
|
? header.slice(0, index).trim()
|
||||||
|
: header.trim()
|
||||||
|
|
||||||
|
if (mediaTypeRE.test(type) === false) {
|
||||||
|
throw new TypeError('invalid media type')
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
type: type.toLowerCase(),
|
||||||
|
parameters: new NullObject()
|
||||||
|
}
|
||||||
|
|
||||||
|
// parse parameters
|
||||||
|
if (index === -1) {
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
let key
|
||||||
|
let match
|
||||||
|
let value
|
||||||
|
|
||||||
|
paramRE.lastIndex = index
|
||||||
|
|
||||||
|
while ((match = paramRE.exec(header))) {
|
||||||
|
if (match.index !== index) {
|
||||||
|
throw new TypeError('invalid parameter format')
|
||||||
|
}
|
||||||
|
|
||||||
|
index += match[0].length
|
||||||
|
key = match[1].toLowerCase()
|
||||||
|
value = match[2]
|
||||||
|
|
||||||
|
if (value[0] === '"') {
|
||||||
|
// remove quotes and escapes
|
||||||
|
value = value
|
||||||
|
.slice(1, value.length - 1)
|
||||||
|
|
||||||
|
quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'))
|
||||||
|
}
|
||||||
|
|
||||||
|
result.parameters[key] = value
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index !== header.length) {
|
||||||
|
throw new TypeError('invalid parameter format')
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
function safeParse (header) {
|
||||||
|
if (typeof header !== 'string') {
|
||||||
|
return defaultContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
let index = header.indexOf(';')
|
||||||
|
const type = index !== -1
|
||||||
|
? header.slice(0, index).trim()
|
||||||
|
: header.trim()
|
||||||
|
|
||||||
|
if (mediaTypeRE.test(type) === false) {
|
||||||
|
return defaultContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
type: type.toLowerCase(),
|
||||||
|
parameters: new NullObject()
|
||||||
|
}
|
||||||
|
|
||||||
|
// parse parameters
|
||||||
|
if (index === -1) {
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
let key
|
||||||
|
let match
|
||||||
|
let value
|
||||||
|
|
||||||
|
paramRE.lastIndex = index
|
||||||
|
|
||||||
|
while ((match = paramRE.exec(header))) {
|
||||||
|
if (match.index !== index) {
|
||||||
|
return defaultContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
index += match[0].length
|
||||||
|
key = match[1].toLowerCase()
|
||||||
|
value = match[2]
|
||||||
|
|
||||||
|
if (value[0] === '"') {
|
||||||
|
// remove quotes and escapes
|
||||||
|
value = value
|
||||||
|
.slice(1, value.length - 1)
|
||||||
|
|
||||||
|
quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'))
|
||||||
|
}
|
||||||
|
|
||||||
|
result.parameters[key] = value
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index !== header.length) {
|
||||||
|
return defaultContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
__webpack_unused_export__ = { parse, safeParse }
|
||||||
|
__webpack_unused_export__ = parse
|
||||||
|
module.exports.xL = safeParse
|
||||||
|
__webpack_unused_export__ = defaultContentType
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 3247:
|
/***/ 3247:
|
||||||
@ -32112,13 +32290,10 @@ function lowercaseKeys(object) {
|
|||||||
|
|
||||||
// pkg/dist-src/util/is-plain-object.js
|
// pkg/dist-src/util/is-plain-object.js
|
||||||
function isPlainObject(value) {
|
function isPlainObject(value) {
|
||||||
if (typeof value !== "object" || value === null)
|
if (typeof value !== "object" || value === null) return false;
|
||||||
return false;
|
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
|
||||||
if (Object.prototype.toString.call(value) !== "[object Object]")
|
|
||||||
return false;
|
|
||||||
const proto = Object.getPrototypeOf(value);
|
const proto = Object.getPrototypeOf(value);
|
||||||
if (proto === null)
|
if (proto === null) return true;
|
||||||
return true;
|
|
||||||
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
||||||
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
|
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
|
||||||
}
|
}
|
||||||
@ -32128,10 +32303,8 @@ function mergeDeep(defaults, options) {
|
|||||||
const result = Object.assign({}, defaults);
|
const result = Object.assign({}, defaults);
|
||||||
Object.keys(options).forEach((key) => {
|
Object.keys(options).forEach((key) => {
|
||||||
if (isPlainObject(options[key])) {
|
if (isPlainObject(options[key])) {
|
||||||
if (!(key in defaults))
|
if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
|
||||||
Object.assign(result, { [key]: options[key] });
|
else result[key] = mergeDeep(defaults[key], options[key]);
|
||||||
else
|
|
||||||
result[key] = mergeDeep(defaults[key], options[key]);
|
|
||||||
} else {
|
} else {
|
||||||
Object.assign(result, { [key]: options[key] });
|
Object.assign(result, { [key]: options[key] });
|
||||||
}
|
}
|
||||||
@ -32429,6 +32602,8 @@ function withDefaults(oldDefaults, newDefaults) {
|
|||||||
var endpoint = withDefaults(null, DEFAULTS);
|
var endpoint = withDefaults(null, DEFAULTS);
|
||||||
|
|
||||||
|
|
||||||
|
// EXTERNAL MODULE: ./node_modules/fast-content-type-parse/index.js
|
||||||
|
var fast_content_type_parse = __nccwpck_require__(8739);
|
||||||
;// CONCATENATED MODULE: ./node_modules/@octokit/request-error/dist-src/index.js
|
;// CONCATENATED MODULE: ./node_modules/@octokit/request-error/dist-src/index.js
|
||||||
class RequestError extends Error {
|
class RequestError extends Error {
|
||||||
name;
|
name;
|
||||||
@ -32486,6 +32661,9 @@ var defaults_default = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// pkg/dist-src/fetch-wrapper.js
|
||||||
|
|
||||||
|
|
||||||
// pkg/dist-src/is-plain-object.js
|
// pkg/dist-src/is-plain-object.js
|
||||||
function dist_bundle_isPlainObject(value) {
|
function dist_bundle_isPlainObject(value) {
|
||||||
if (typeof value !== "object" || value === null) return false;
|
if (typeof value !== "object" || value === null) return false;
|
||||||
@ -32598,13 +32776,23 @@ async function fetchWrapper(requestOptions) {
|
|||||||
}
|
}
|
||||||
async function getResponseData(response) {
|
async function getResponseData(response) {
|
||||||
const contentType = response.headers.get("content-type");
|
const contentType = response.headers.get("content-type");
|
||||||
if (/application\/json/.test(contentType)) {
|
if (!contentType) {
|
||||||
return response.json().catch(() => response.text()).catch(() => "");
|
return response.text().catch(() => "");
|
||||||
}
|
}
|
||||||
if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
|
const mimetype = (0,fast_content_type_parse/* safeParse */.xL)(contentType);
|
||||||
return response.text();
|
if (mimetype.type === "application/json") {
|
||||||
|
let text = "";
|
||||||
|
try {
|
||||||
|
text = await response.text();
|
||||||
|
return JSON.parse(text);
|
||||||
|
} catch (err) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
} else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") {
|
||||||
|
return response.text().catch(() => "");
|
||||||
|
} else {
|
||||||
|
return response.arrayBuffer().catch(() => new ArrayBuffer(0));
|
||||||
}
|
}
|
||||||
return response.arrayBuffer();
|
|
||||||
}
|
}
|
||||||
function toErrorMessage(data) {
|
function toErrorMessage(data) {
|
||||||
if (typeof data === "string") {
|
if (typeof data === "string") {
|
||||||
@ -32705,8 +32893,7 @@ function graphql(request2, query, options) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
for (const key in options) {
|
for (const key in options) {
|
||||||
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
|
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
|
||||||
continue;
|
|
||||||
return Promise.reject(
|
return Promise.reject(
|
||||||
new Error(
|
new Error(
|
||||||
`[@octokit/graphql] "${key}" cannot be used as variable name`
|
`[@octokit/graphql] "${key}" cannot be used as variable name`
|
||||||
@ -32829,7 +33016,7 @@ var createTokenAuth = function createTokenAuth2(token) {
|
|||||||
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
|
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
|
||||||
const version_VERSION = "6.1.2";
|
const version_VERSION = "6.1.3";
|
||||||
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
|
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
|
||||||
|
Loading…
x
Reference in New Issue
Block a user