fumadocs-openapi 11.4.0 → 11.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.translations/index.d.ts +2 -3
- package/dist/generate-file.d.ts +5 -6
- package/dist/i18n.d.ts +3 -3
- package/dist/node_modules/.pnpm/fast-content-type-parse@4.0.0/node_modules/fast-content-type-parse/index.js +226 -0
- package/dist/playground/client.d.ts +10 -10
- package/dist/playground/components/result-display.d.ts +3 -4
- package/dist/playground/components/result-display.js +1 -1
- package/dist/playground/fetcher.d.ts +5 -6
- package/dist/requests/generators/all.d.ts +2 -3
- package/dist/requests/generators/csharp.d.ts +2 -3
- package/dist/requests/generators/curl.d.ts +2 -3
- package/dist/requests/generators/go.d.ts +2 -3
- package/dist/requests/generators/index.d.ts +7 -8
- package/dist/requests/generators/java.d.ts +2 -3
- package/dist/requests/generators/javascript.d.ts +2 -3
- package/dist/requests/generators/python.d.ts +3 -4
- package/dist/requests/generators/rust.d.ts +2 -3
- package/dist/requests/media/adapter.d.ts +3 -4
- package/dist/requests/media/encode.d.ts +3 -4
- package/dist/requests/types.d.ts +3 -4
- package/dist/scalar/index.d.ts +2 -3
- package/dist/server/index.d.ts +9 -9
- package/dist/server/proxy.d.ts +5 -6
- package/dist/types/openapi.d.ts +7 -8
- package/dist/types.d.ts +20 -21
- package/dist/ui/base.d.ts +2 -3
- package/dist/ui/contexts/api.d.ts +4 -5
- package/dist/ui/create-client.d.ts +4 -5
- package/dist/ui/index.d.ts +11 -9
- package/dist/ui/operation/context.d.ts +3 -4
- package/dist/ui/operation/index.js +2 -0
- package/dist/ui/operation/request-tabs.d.ts +2 -3
- package/dist/ui/operation/response-tabs.d.ts +3 -4
- package/dist/ui/operation/usage-tabs.js +4 -6
- package/dist/utils/cn.js +1 -1
- package/dist/utils/document/dereference.d.ts +2 -3
- package/dist/utils/get-example-requests.d.ts +2 -3
- package/dist/utils/pages/builder.d.ts +11 -12
- package/dist/utils/pages/preset-auto.d.ts +2 -3
- package/dist/utils/pages/to-text.d.ts +3 -4
- package/package.json +13 -13
- package/dist/node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.js +0 -115
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.js
|
|
3
|
-
var require_fast_content_type_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
-
const NullObject = function NullObject() {};
|
|
5
|
-
NullObject.prototype = Object.create(null);
|
|
6
|
-
/**
|
|
7
|
-
* RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
|
|
8
|
-
*
|
|
9
|
-
* parameter = token "=" ( token / quoted-string )
|
|
10
|
-
* token = 1*tchar
|
|
11
|
-
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
|
|
12
|
-
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
|
|
13
|
-
* / DIGIT / ALPHA
|
|
14
|
-
* ; any VCHAR, except delimiters
|
|
15
|
-
* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
|
|
16
|
-
* qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
|
|
17
|
-
* obs-text = %x80-FF
|
|
18
|
-
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
19
|
-
*/
|
|
20
|
-
const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
|
|
21
|
-
/**
|
|
22
|
-
* RegExp to match quoted-pair in RFC 7230 sec 3.2.6
|
|
23
|
-
*
|
|
24
|
-
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
25
|
-
* obs-text = %x80-FF
|
|
26
|
-
*/
|
|
27
|
-
const quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
|
|
28
|
-
/**
|
|
29
|
-
* RegExp to match type in RFC 7231 sec 3.1.1.1
|
|
30
|
-
*
|
|
31
|
-
* media-type = type "/" subtype
|
|
32
|
-
* type = token
|
|
33
|
-
* subtype = token
|
|
34
|
-
*/
|
|
35
|
-
const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
|
|
36
|
-
const defaultContentType = {
|
|
37
|
-
type: "",
|
|
38
|
-
parameters: new NullObject()
|
|
39
|
-
};
|
|
40
|
-
Object.freeze(defaultContentType.parameters);
|
|
41
|
-
Object.freeze(defaultContentType);
|
|
42
|
-
/**
|
|
43
|
-
* Parse media type to object.
|
|
44
|
-
*
|
|
45
|
-
* @param {string|object} header
|
|
46
|
-
* @return {Object}
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
|
-
function parse(header) {
|
|
50
|
-
if (typeof header !== "string") throw new TypeError("argument header is required and must be a string");
|
|
51
|
-
let index = header.indexOf(";");
|
|
52
|
-
const type = index !== -1 ? header.slice(0, index).trim() : header.trim();
|
|
53
|
-
if (mediaTypeRE.test(type) === false) throw new TypeError("invalid media type");
|
|
54
|
-
const result = {
|
|
55
|
-
type: type.toLowerCase(),
|
|
56
|
-
parameters: new NullObject()
|
|
57
|
-
};
|
|
58
|
-
if (index === -1) return result;
|
|
59
|
-
let key;
|
|
60
|
-
let match;
|
|
61
|
-
let value;
|
|
62
|
-
paramRE.lastIndex = index;
|
|
63
|
-
while (match = paramRE.exec(header)) {
|
|
64
|
-
if (match.index !== index) throw new TypeError("invalid parameter format");
|
|
65
|
-
index += match[0].length;
|
|
66
|
-
key = match[1].toLowerCase();
|
|
67
|
-
value = match[2];
|
|
68
|
-
if (value[0] === "\"") {
|
|
69
|
-
value = value.slice(1, value.length - 1);
|
|
70
|
-
quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1"));
|
|
71
|
-
}
|
|
72
|
-
result.parameters[key] = value;
|
|
73
|
-
}
|
|
74
|
-
if (index !== header.length) throw new TypeError("invalid parameter format");
|
|
75
|
-
return result;
|
|
76
|
-
}
|
|
77
|
-
function safeParse(header) {
|
|
78
|
-
if (typeof header !== "string") return defaultContentType;
|
|
79
|
-
let index = header.indexOf(";");
|
|
80
|
-
const type = index !== -1 ? header.slice(0, index).trim() : header.trim();
|
|
81
|
-
if (mediaTypeRE.test(type) === false) return defaultContentType;
|
|
82
|
-
const result = {
|
|
83
|
-
type: type.toLowerCase(),
|
|
84
|
-
parameters: new NullObject()
|
|
85
|
-
};
|
|
86
|
-
if (index === -1) return result;
|
|
87
|
-
let key;
|
|
88
|
-
let match;
|
|
89
|
-
let value;
|
|
90
|
-
paramRE.lastIndex = index;
|
|
91
|
-
while (match = paramRE.exec(header)) {
|
|
92
|
-
if (match.index !== index) return defaultContentType;
|
|
93
|
-
index += match[0].length;
|
|
94
|
-
key = match[1].toLowerCase();
|
|
95
|
-
value = match[2];
|
|
96
|
-
if (value[0] === "\"") {
|
|
97
|
-
value = value.slice(1, value.length - 1);
|
|
98
|
-
quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1"));
|
|
99
|
-
}
|
|
100
|
-
result.parameters[key] = value;
|
|
101
|
-
}
|
|
102
|
-
if (index !== header.length) return defaultContentType;
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
|
-
module.exports.default = {
|
|
106
|
-
parse,
|
|
107
|
-
safeParse
|
|
108
|
-
};
|
|
109
|
-
module.exports.parse = parse;
|
|
110
|
-
module.exports.safeParse = safeParse;
|
|
111
|
-
module.exports.defaultContentType = defaultContentType;
|
|
112
|
-
}));
|
|
113
|
-
//#endregion
|
|
114
|
-
export default require_fast_content_type_parse();
|
|
115
|
-
export { require_fast_content_type_parse };
|