@@ -31754,6 +31754,184 @@ function parseParams (str) {
31754
31754
module.exports = parseParams
31755
31755
31756
31756
31757
+ /***/ }),
31758
+
31759
+ /***/ 8739:
31760
+ /***/ ((module) => {
31761
+
31762
+ "use strict";
31763
+ var __webpack_unused_export__;
31764
+
31765
+
31766
+ const NullObject = function NullObject () { }
31767
+ NullObject.prototype = Object.create(null)
31768
+
31769
+ /**
31770
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
31771
+ *
31772
+ * parameter = token "=" ( token / quoted-string )
31773
+ * token = 1*tchar
31774
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
31775
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
31776
+ * / DIGIT / ALPHA
31777
+ * ; any VCHAR, except delimiters
31778
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
31779
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
31780
+ * obs-text = %x80-FF
31781
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
31782
+ */
31783
+ const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu
31784
+
31785
+ /**
31786
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
31787
+ *
31788
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
31789
+ * obs-text = %x80-FF
31790
+ */
31791
+ const quotedPairRE = /\\([\v\u0020-\u00ff])/gu
31792
+
31793
+ /**
31794
+ * RegExp to match type in RFC 7231 sec 3.1.1.1
31795
+ *
31796
+ * media-type = type "/" subtype
31797
+ * type = token
31798
+ * subtype = token
31799
+ */
31800
+ const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u
31801
+
31802
+ // default ContentType to prevent repeated object creation
31803
+ const defaultContentType = { type: '', parameters: new NullObject() }
31804
+ Object.freeze(defaultContentType.parameters)
31805
+ Object.freeze(defaultContentType)
31806
+
31807
+ /**
31808
+ * Parse media type to object.
31809
+ *
31810
+ * @param {string|object} header
31811
+ * @return {Object}
31812
+ * @public
31813
+ */
31814
+
31815
+ function parse (header) {
31816
+ if (typeof header !== 'string') {
31817
+ throw new TypeError('argument header is required and must be a string')
31818
+ }
31819
+
31820
+ let index = header.indexOf(';')
31821
+ const type = index !== -1
31822
+ ? header.slice(0, index).trim()
31823
+ : header.trim()
31824
+
31825
+ if (mediaTypeRE.test(type) === false) {
31826
+ throw new TypeError('invalid media type')
31827
+ }
31828
+
31829
+ const result = {
31830
+ type: type.toLowerCase(),
31831
+ parameters: new NullObject()
31832
+ }
31833
+
31834
+ // parse parameters
31835
+ if (index === -1) {
31836
+ return result
31837
+ }
31838
+
31839
+ let key
31840
+ let match
31841
+ let value
31842
+
31843
+ paramRE.lastIndex = index
31844
+
31845
+ while ((match = paramRE.exec(header))) {
31846
+ if (match.index !== index) {
31847
+ throw new TypeError('invalid parameter format')
31848
+ }
31849
+
31850
+ index += match[0].length
31851
+ key = match[1].toLowerCase()
31852
+ value = match[2]
31853
+
31854
+ if (value[0] === '"') {
31855
+ // remove quotes and escapes
31856
+ value = value
31857
+ .slice(1, value.length - 1)
31858
+
31859
+ quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'))
31860
+ }
31861
+
31862
+ result.parameters[key] = value
31863
+ }
31864
+
31865
+ if (index !== header.length) {
31866
+ throw new TypeError('invalid parameter format')
31867
+ }
31868
+
31869
+ return result
31870
+ }
31871
+
31872
+ function safeParse (header) {
31873
+ if (typeof header !== 'string') {
31874
+ return defaultContentType
31875
+ }
31876
+
31877
+ let index = header.indexOf(';')
31878
+ const type = index !== -1
31879
+ ? header.slice(0, index).trim()
31880
+ : header.trim()
31881
+
31882
+ if (mediaTypeRE.test(type) === false) {
31883
+ return defaultContentType
31884
+ }
31885
+
31886
+ const result = {
31887
+ type: type.toLowerCase(),
31888
+ parameters: new NullObject()
31889
+ }
31890
+
31891
+ // parse parameters
31892
+ if (index === -1) {
31893
+ return result
31894
+ }
31895
+
31896
+ let key
31897
+ let match
31898
+ let value
31899
+
31900
+ paramRE.lastIndex = index
31901
+
31902
+ while ((match = paramRE.exec(header))) {
31903
+ if (match.index !== index) {
31904
+ return defaultContentType
31905
+ }
31906
+
31907
+ index += match[0].length
31908
+ key = match[1].toLowerCase()
31909
+ value = match[2]
31910
+
31911
+ if (value[0] === '"') {
31912
+ // remove quotes and escapes
31913
+ value = value
31914
+ .slice(1, value.length - 1)
31915
+
31916
+ quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'))
31917
+ }
31918
+
31919
+ result.parameters[key] = value
31920
+ }
31921
+
31922
+ if (index !== header.length) {
31923
+ return defaultContentType
31924
+ }
31925
+
31926
+ return result
31927
+ }
31928
+
31929
+ __webpack_unused_export__ = { parse, safeParse }
31930
+ __webpack_unused_export__ = parse
31931
+ module.exports.xL = safeParse
31932
+ __webpack_unused_export__ = defaultContentType
31933
+
31934
+
31757
31935
/***/ }),
31758
31936
31759
31937
/***/ 3247:
@@ -32087,13 +32265,10 @@ function lowercaseKeys(object) {
32087
32265
32088
32266
// pkg/dist-src/util/is-plain-object.js
32089
32267
function isPlainObject(value) {
32090
- if (typeof value !== "object" || value === null)
32091
- return false;
32092
- if (Object.prototype.toString.call(value) !== "[object Object]")
32093
- return false;
32268
+ if (typeof value !== "object" || value === null) return false;
32269
+ if (Object.prototype.toString.call(value) !== "[object Object]") return false;
32094
32270
const proto = Object.getPrototypeOf(value);
32095
- if (proto === null)
32096
- return true;
32271
+ if (proto === null) return true;
32097
32272
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
32098
32273
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
32099
32274
}
@@ -32103,10 +32278,8 @@ function mergeDeep(defaults, options) {
32103
32278
const result = Object.assign({}, defaults);
32104
32279
Object.keys(options).forEach((key) => {
32105
32280
if (isPlainObject(options[key])) {
32106
- if (!(key in defaults))
32107
- Object.assign(result, { [key]: options[key] });
32108
- else
32109
- result[key] = mergeDeep(defaults[key], options[key]);
32281
+ if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
32282
+ else result[key] = mergeDeep(defaults[key], options[key]);
32110
32283
} else {
32111
32284
Object.assign(result, { [key]: options[key] });
32112
32285
}
@@ -32404,6 +32577,8 @@ function withDefaults(oldDefaults, newDefaults) {
32404
32577
var endpoint = withDefaults(null, DEFAULTS);
32405
32578
32406
32579
32580
+ // EXTERNAL MODULE: ./node_modules/fast-content-type-parse/index.js
32581
+ var fast_content_type_parse = __nccwpck_require__(8739);
32407
32582
;// CONCATENATED MODULE: ./node_modules/@octokit/request-error/dist-src/index.js
32408
32583
class RequestError extends Error {
32409
32584
name;
@@ -32461,6 +32636,9 @@ var defaults_default = {
32461
32636
}
32462
32637
};
32463
32638
32639
+ // pkg/dist-src/fetch-wrapper.js
32640
+
32641
+
32464
32642
// pkg/dist-src/is-plain-object.js
32465
32643
function dist_bundle_isPlainObject(value) {
32466
32644
if (typeof value !== "object" || value === null) return false;
@@ -32573,13 +32751,23 @@ async function fetchWrapper(requestOptions) {
32573
32751
}
32574
32752
async function getResponseData(response) {
32575
32753
const contentType = response.headers.get("content-type");
32576
- if (/application\/json/.test( contentType) ) {
32577
- return response.json().catch(() => response. text() ).catch(() => "");
32754
+ if (! contentType) {
32755
+ return response.text().catch(() => "");
32578
32756
}
32579
- if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
32580
- return response.text();
32757
+ const mimetype = (0,fast_content_type_parse/* safeParse */.xL)(contentType);
32758
+ if (mimetype.type === "application/json") {
32759
+ let text = "";
32760
+ try {
32761
+ text = await response.text();
32762
+ return JSON.parse(text);
32763
+ } catch (err) {
32764
+ return text;
32765
+ }
32766
+ } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") {
32767
+ return response.text().catch(() => "");
32768
+ } else {
32769
+ return response.arrayBuffer().catch(() => new ArrayBuffer(0));
32581
32770
}
32582
- return response.arrayBuffer();
32583
32771
}
32584
32772
function toErrorMessage(data) {
32585
32773
if (typeof data === "string") {
@@ -32680,8 +32868,7 @@ function graphql(request2, query, options) {
32680
32868
);
32681
32869
}
32682
32870
for (const key in options) {
32683
- if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
32684
- continue;
32871
+ if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
32685
32872
return Promise.reject(
32686
32873
new Error(
32687
32874
`[@octokit/graphql] "${key}" cannot be used as variable name`
@@ -32804,7 +32991,7 @@ var createTokenAuth = function createTokenAuth2(token) {
32804
32991
32805
32992
32806
32993
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
32807
- const version_VERSION = "6.1.2 ";
32994
+ const version_VERSION = "6.1.3 ";
32808
32995
32809
32996
32810
32997
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
0 commit comments