fumadocs-openapi 10.10.1 → 10.10.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.
Files changed (125) hide show
  1. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/bundle.js +239 -0
  2. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/dereference.js +187 -0
  3. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js +136 -0
  4. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/normalize-args.js +41 -0
  5. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.js +124 -0
  6. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parse.js +109 -0
  7. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/binary.js +30 -0
  8. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/json.js +46 -0
  9. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js +36 -0
  10. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js +49 -0
  11. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js +242 -0
  12. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.js +247 -0
  13. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.js +210 -0
  14. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external.js +100 -0
  15. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/file.js +41 -0
  16. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js +112 -0
  17. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js +8 -0
  18. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js +146 -0
  19. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js +5 -0
  20. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js +18 -0
  21. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js +11 -0
  22. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js +99 -0
  23. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js +30 -0
  24. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js +315 -0
  25. package/dist/utils/document/process.js +7 -12
  26. package/package.json +6 -9
  27. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/general/create-limiter.js +0 -43
  28. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/object/is-object.js +0 -27
  29. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/object/prevent-pollution.js +0 -33
  30. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/queue/queue.js +0 -106
  31. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/string/generate-hash.js +0 -120
  32. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/bundle.js +0 -357
  33. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js +0 -73
  34. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js +0 -3
  35. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +0 -1
  36. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js +0 -51
  37. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/value-generator.js +0 -102
  38. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js +0 -24
  39. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js +0 -11
  40. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js +0 -44
  41. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js +0 -10
  42. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js +0 -42
  43. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js +0 -23
  44. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js +0 -23
  45. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js +0 -28
  46. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js +0 -21
  47. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/normalize.js +0 -33
  48. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js +0 -30
  49. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js +0 -70
  50. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js +0 -33
  51. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js +0 -12
  52. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.js +0 -19
  53. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +0 -430
  54. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-collection.js +0 -50
  55. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -39
  56. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-node.js +0 -85
  57. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-scalar.js +0 -57
  58. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/composer.js +0 -193
  59. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -82
  60. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +0 -174
  61. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +0 -40
  62. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-end.js +0 -36
  63. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +0 -153
  64. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +0 -203
  65. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js +0 -105
  66. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js +0 -27
  67. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +0 -25
  68. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +0 -10
  69. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js +0 -10
  70. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js +0 -277
  71. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js +0 -62
  72. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -38
  73. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js +0 -61
  74. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js +0 -163
  75. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/errors.js +0 -48
  76. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/index.js +0 -16
  77. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js +0 -6
  78. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Alias.js +0 -92
  79. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js +0 -117
  80. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js +0 -32
  81. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js +0 -29
  82. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js +0 -24
  83. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLMap.js +0 -106
  84. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +0 -104
  85. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +0 -49
  86. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/identity.js +0 -33
  87. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/toJS.js +0 -35
  88. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-scalar.js +0 -3
  89. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-visit.js +0 -89
  90. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst.js +0 -40
  91. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/lexer.js +0 -529
  92. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/line-counter.js +0 -45
  93. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/parser.js +0 -859
  94. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/public-api.js +0 -44
  95. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/Schema.js +0 -27
  96. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/map.js +0 -16
  97. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/null.js +0 -13
  98. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/seq.js +0 -16
  99. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/string.js +0 -14
  100. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/bool.js +0 -17
  101. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/float.js +0 -38
  102. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/int.js +0 -37
  103. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/schema.js +0 -23
  104. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/json/schema.js +0 -61
  105. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/tags.js +0 -81
  106. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +0 -52
  107. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +0 -24
  108. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +0 -41
  109. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +0 -70
  110. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -39
  111. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +0 -60
  112. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +0 -56
  113. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -39
  114. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +0 -65
  115. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +0 -79
  116. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +0 -111
  117. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringify.js +0 -105
  118. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +0 -116
  119. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyComment.js +0 -16
  120. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +0 -59
  121. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +0 -19
  122. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyPair.js +0 -95
  123. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyString.js +0 -222
  124. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/visit.js +0 -187
  125. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/index.js +0 -16
@@ -0,0 +1,112 @@
1
+ import { isHttp, isUnsafeUrl, parse, resolve } from "../util/url.js";
2
+ import { ResolverError } from "../util/errors.js";
3
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js
4
+ var http_default = {
5
+ /**
6
+ * The order that this resolver will run, in relation to other resolvers.
7
+ */
8
+ order: 200,
9
+ /**
10
+ * HTTP headers to send when downloading files.
11
+ *
12
+ * @example:
13
+ * {
14
+ * "User-Agent": "JSON Schema $Ref Parser",
15
+ * Accept: "application/json"
16
+ * }
17
+ */
18
+ headers: null,
19
+ /**
20
+ * HTTP request timeout (in milliseconds).
21
+ */
22
+ timeout: 6e4,
23
+ /**
24
+ * The maximum number of HTTP redirects to follow.
25
+ * To disable automatic following of redirects, set this to zero.
26
+ */
27
+ redirects: 5,
28
+ /**
29
+ * The `withCredentials` option of XMLHttpRequest.
30
+ * Set this to `true` if you're downloading files from a CORS-enabled server that requires authentication
31
+ */
32
+ withCredentials: false,
33
+ /**
34
+ * Set this to `false` if you want to allow unsafe URLs (e.g., `127.0.0.1`, localhost, and other internal URLs).
35
+ */
36
+ safeUrlResolver: true,
37
+ /**
38
+ * Determines whether this resolver can read a given file reference.
39
+ * Resolvers that return true will be tried in order, until one successfully resolves the file.
40
+ * Resolvers that return false will not be given a chance to resolve the file.
41
+ */
42
+ canRead(file) {
43
+ return isHttp(file.url) && (!this.safeUrlResolver || !isUnsafeUrl(file.url));
44
+ },
45
+ /**
46
+ * Reads the given URL and returns its raw contents as a Buffer.
47
+ */
48
+ read(file) {
49
+ const u = parse(file.url);
50
+ if (typeof window !== "undefined" && !u.protocol) u.protocol = parse(location.href).protocol;
51
+ return download(u, this);
52
+ }
53
+ };
54
+ /**
55
+ * Downloads the given file.
56
+ * @returns
57
+ * The promise resolves with the raw downloaded data, or rejects if there is an HTTP error.
58
+ */
59
+ async function download(u, httpOptions, _redirects) {
60
+ u = parse(u);
61
+ const redirects = _redirects || [];
62
+ redirects.push(u.href);
63
+ try {
64
+ const res = await get(u, httpOptions);
65
+ if (res.status >= 400) {
66
+ const error = /* @__PURE__ */ new Error(`HTTP ERROR ${res.status}`);
67
+ error.status = res.status;
68
+ throw error;
69
+ } else if (res.status >= 300) if (!Number.isNaN(httpOptions.redirects) && redirects.length > httpOptions.redirects) {
70
+ const error = /* @__PURE__ */ new Error(`Error downloading ${redirects[0]}. \nToo many redirects: \n ${redirects.join(" \n ")}`);
71
+ error.status = res.status;
72
+ throw new ResolverError(error);
73
+ } else if (!("location" in res.headers) || !res.headers.location) {
74
+ const error = /* @__PURE__ */ new Error(`HTTP ${res.status} redirect with no location header`);
75
+ error.status = res.status;
76
+ throw error;
77
+ } else return download(resolve(u.href, res.headers.location), httpOptions, redirects);
78
+ else {
79
+ if (res.body) {
80
+ const buf = await res.arrayBuffer();
81
+ return Buffer.from(buf);
82
+ }
83
+ return Buffer.alloc(0);
84
+ }
85
+ } catch (err) {
86
+ const e = err;
87
+ e.message = `Error downloading ${u.href}: ${e.message}`;
88
+ throw new ResolverError(e, u.href);
89
+ }
90
+ }
91
+ /**
92
+ * Sends an HTTP GET request.
93
+ * The promise resolves with the HTTP Response object.
94
+ */
95
+ async function get(u, httpOptions) {
96
+ let controller;
97
+ let timeoutId;
98
+ if (httpOptions.timeout && typeof AbortController !== "undefined") {
99
+ controller = new AbortController();
100
+ timeoutId = setTimeout(() => controller.abort(), httpOptions.timeout);
101
+ }
102
+ const response = await fetch(u, {
103
+ method: "GET",
104
+ headers: httpOptions.headers || {},
105
+ credentials: httpOptions.withCredentials ? "include" : "same-origin",
106
+ signal: controller ? controller.signal : null
107
+ });
108
+ if (timeoutId) clearTimeout(timeoutId);
109
+ return response;
110
+ }
111
+ //#endregion
112
+ export { http_default as default };
@@ -0,0 +1,8 @@
1
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js
2
+ const win32Sep = "\\";
3
+ function convertPathToPosix(filePath) {
4
+ if (filePath.startsWith("\\\\?\\")) return filePath;
5
+ return filePath.split(win32Sep).join("/");
6
+ }
7
+ //#endregion
8
+ export { convertPathToPosix as default };
@@ -0,0 +1,146 @@
1
+ import { getHash, stripHash, toFileSystemPath } from "./url.js";
2
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js
3
+ const nonJsonTypes = [
4
+ "function",
5
+ "symbol",
6
+ "undefined"
7
+ ];
8
+ const protectedProps = [
9
+ "constructor",
10
+ "prototype",
11
+ "__proto__"
12
+ ];
13
+ const objectPrototype = Object.getPrototypeOf({});
14
+ /**
15
+ * Custom JSON serializer for Error objects.
16
+ * Returns all built-in error properties, as well as extended properties.
17
+ */
18
+ function toJSON() {
19
+ const pojo = {};
20
+ const error = this;
21
+ for (const key of getDeepKeys(error)) if (typeof key === "string") {
22
+ const value = error[key];
23
+ const type = typeof value;
24
+ if (!nonJsonTypes.includes(type)) pojo[key] = value;
25
+ }
26
+ return pojo;
27
+ }
28
+ /**
29
+ * Returns own, inherited, enumerable, non-enumerable, string, and symbol keys of `obj`.
30
+ * Does NOT return members of the base Object prototype, or the specified omitted keys.
31
+ */
32
+ function getDeepKeys(obj, omit = []) {
33
+ let keys = [];
34
+ while (obj && obj !== objectPrototype) {
35
+ keys = keys.concat(Object.getOwnPropertyNames(obj), Object.getOwnPropertySymbols(obj));
36
+ obj = Object.getPrototypeOf(obj);
37
+ }
38
+ const uniqueKeys = new Set(keys);
39
+ for (const key of omit.concat(protectedProps)) uniqueKeys.delete(key);
40
+ return uniqueKeys;
41
+ }
42
+ var JSONParserError = class extends Error {
43
+ name;
44
+ message;
45
+ source;
46
+ path;
47
+ code;
48
+ constructor(message, source) {
49
+ super();
50
+ this.code = "EUNKNOWN";
51
+ this.name = "JSONParserError";
52
+ this.message = message;
53
+ this.source = source;
54
+ this.path = null;
55
+ }
56
+ toJSON = toJSON.bind(this);
57
+ get footprint() {
58
+ return `${this.path}+${this.source}+${this.code}+${this.message}`;
59
+ }
60
+ };
61
+ var JSONParserErrorGroup = class JSONParserErrorGroup extends Error {
62
+ files;
63
+ constructor(parser) {
64
+ super();
65
+ this.files = parser;
66
+ this.name = "JSONParserErrorGroup";
67
+ this.message = `${this.errors.length} error${this.errors.length > 1 ? "s" : ""} occurred while reading '${toFileSystemPath(parser.$refs._root$Ref.path)}'`;
68
+ }
69
+ toJSON = toJSON.bind(this);
70
+ static getParserErrors(parser) {
71
+ const errors = [];
72
+ for (const $ref of Object.values(parser.$refs._$refs)) if ($ref.errors) errors.push(...$ref.errors);
73
+ return errors;
74
+ }
75
+ get errors() {
76
+ return JSONParserErrorGroup.getParserErrors(this.files);
77
+ }
78
+ };
79
+ var ParserError = class extends JSONParserError {
80
+ code = "EPARSER";
81
+ name = "ParserError";
82
+ constructor(message, source) {
83
+ super(`Error parsing ${source}: ${message}`, source);
84
+ }
85
+ };
86
+ var UnmatchedParserError = class extends JSONParserError {
87
+ code = "EUNMATCHEDPARSER";
88
+ name = "UnmatchedParserError";
89
+ constructor(source) {
90
+ super(`Could not find parser for "${source}"`, source);
91
+ }
92
+ };
93
+ var ResolverError = class extends JSONParserError {
94
+ code = "ERESOLVER";
95
+ name = "ResolverError";
96
+ ioErrorCode;
97
+ constructor(ex, source) {
98
+ super(ex.message || `Error reading file "${source}"`, source);
99
+ if ("code" in ex) this.ioErrorCode = String(ex.code);
100
+ }
101
+ };
102
+ var UnmatchedResolverError = class extends JSONParserError {
103
+ code = "EUNMATCHEDRESOLVER";
104
+ name = "UnmatchedResolverError";
105
+ constructor(source) {
106
+ super(`Could not find resolver for "${source}"`, source);
107
+ }
108
+ };
109
+ var MissingPointerError = class extends JSONParserError {
110
+ code = "EMISSINGPOINTER";
111
+ name = "MissingPointerError";
112
+ targetToken;
113
+ targetRef;
114
+ targetFound;
115
+ parentPath;
116
+ constructor(token, path, targetRef, targetFound, parentPath) {
117
+ super(`Missing $ref pointer "${getHash(path)}". Token "${token}" does not exist.`, stripHash(path));
118
+ this.targetToken = token;
119
+ this.targetRef = targetRef;
120
+ this.targetFound = targetFound;
121
+ this.parentPath = parentPath;
122
+ }
123
+ };
124
+ var TimeoutError = class extends JSONParserError {
125
+ code = "ETIMEOUT";
126
+ name = "TimeoutError";
127
+ constructor(timeout) {
128
+ super(`Dereferencing timeout reached: ${timeout}ms`);
129
+ }
130
+ };
131
+ var InvalidPointerError = class extends JSONParserError {
132
+ code = "EUNMATCHEDRESOLVER";
133
+ name = "InvalidPointerError";
134
+ constructor(pointer, path) {
135
+ super(`Invalid $ref pointer "${pointer}". Pointers must begin with "#/"`, stripHash(path));
136
+ }
137
+ };
138
+ function isHandledError(err) {
139
+ return err instanceof JSONParserError || err instanceof JSONParserErrorGroup;
140
+ }
141
+ function normalizeError(err) {
142
+ if (err.path === null) err.path = [];
143
+ return err;
144
+ }
145
+ //#endregion
146
+ export { InvalidPointerError, JSONParserError, JSONParserErrorGroup, MissingPointerError, ParserError, ResolverError, TimeoutError, UnmatchedParserError, UnmatchedResolverError, isHandledError, normalizeError };
@@ -0,0 +1,5 @@
1
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js
2
+ const isWindowsConst = /^win/.test(globalThis.process ? globalThis.process.platform : "");
3
+ const isWindows = () => isWindowsConst;
4
+ //#endregion
5
+ export { isWindows };
@@ -0,0 +1,18 @@
1
+ import next_default from "./next.js";
2
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js
3
+ function maybe(cb, promise) {
4
+ if (cb) {
5
+ promise.then(function(result) {
6
+ next_default(function() {
7
+ cb(null, result);
8
+ });
9
+ }, function(err) {
10
+ next_default(function() {
11
+ cb(err);
12
+ });
13
+ });
14
+ return;
15
+ } else return promise;
16
+ }
17
+ //#endregion
18
+ export { maybe as default };
@@ -0,0 +1,11 @@
1
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js
2
+ function makeNext() {
3
+ if (typeof process === "object" && typeof process.nextTick === "function") return process.nextTick;
4
+ else if (typeof setImmediate === "function") return setImmediate;
5
+ else return function next(f) {
6
+ setTimeout(f, 0);
7
+ };
8
+ }
9
+ var next_default = makeNext();
10
+ //#endregion
11
+ export { next_default as default };
@@ -0,0 +1,99 @@
1
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js
2
+ /**
3
+ * Returns the given plugins as an array, rather than an object map.
4
+ * All other methods in this module expect an array of plugins rather than an object map.
5
+ *
6
+ * @returns
7
+ */
8
+ function all(plugins) {
9
+ return Object.keys(plugins || {}).filter((key) => {
10
+ return typeof plugins[key] === "object";
11
+ }).map((key) => {
12
+ plugins[key].name = key;
13
+ return plugins[key];
14
+ });
15
+ }
16
+ /**
17
+ * Filters the given plugins, returning only the ones return `true` for the given method.
18
+ */
19
+ function filter(plugins, method, file, callback, $refs) {
20
+ return plugins.filter((plugin) => {
21
+ return !!getResult(plugin, method, file, callback, $refs);
22
+ });
23
+ }
24
+ /**
25
+ * Sorts the given plugins, in place, by their `order` property.
26
+ */
27
+ function sort(plugins) {
28
+ for (const plugin of plugins) plugin.order = plugin.order || Number.MAX_SAFE_INTEGER;
29
+ return plugins.sort((a, b) => {
30
+ return a.order - b.order;
31
+ });
32
+ }
33
+ /**
34
+ * Runs the specified method of the given plugins, in order, until one of them returns a successful result.
35
+ * Each method can return a synchronous value, a Promise, or call an error-first callback.
36
+ * If the promise resolves successfully, or the callback is called without an error, then the result
37
+ * is immediately returned and no further plugins are called.
38
+ * If the promise rejects, or the callback is called with an error, then the next plugin is called.
39
+ * If ALL plugins fail, then the last error is thrown.
40
+ */
41
+ async function run(plugins, method, file, $refs) {
42
+ let plugin;
43
+ let lastError;
44
+ let index = 0;
45
+ return new Promise((resolve, reject) => {
46
+ runNextPlugin();
47
+ function runNextPlugin() {
48
+ plugin = plugins[index++];
49
+ if (!plugin) return reject(lastError);
50
+ try {
51
+ const result = getResult(plugin, method, file, callback, $refs);
52
+ if (result && typeof result.then === "function") result.then(onSuccess, onError);
53
+ else if (result !== void 0) onSuccess(result);
54
+ else if (index === plugins.length) throw new Error("No promise has been returned or callback has been called.");
55
+ } catch (e) {
56
+ onError(e);
57
+ }
58
+ }
59
+ function callback(err, result) {
60
+ if (err) onError(err);
61
+ else onSuccess(result);
62
+ }
63
+ function onSuccess(result) {
64
+ resolve({
65
+ plugin,
66
+ result
67
+ });
68
+ }
69
+ function onError(error) {
70
+ lastError = {
71
+ plugin,
72
+ error
73
+ };
74
+ runNextPlugin();
75
+ }
76
+ });
77
+ }
78
+ /**
79
+ * Returns the value of the given property.
80
+ * If the property is a function, then the result of the function is returned.
81
+ * If the value is a RegExp, then it will be tested against the file URL.
82
+ * If the value is an array, then it will be compared against the file extension.
83
+ */
84
+ function getResult(obj, prop, file, callback, $refs) {
85
+ const value = obj[prop];
86
+ if (typeof value === "function") return value.apply(obj, [
87
+ file,
88
+ callback,
89
+ $refs
90
+ ]);
91
+ if (!callback) {
92
+ if (value instanceof RegExp) return value.test(file.url);
93
+ else if (typeof value === "string") return value === file.extension;
94
+ else if (Array.isArray(value)) return value.indexOf(file.extension) !== -1;
95
+ }
96
+ return value;
97
+ }
98
+ //#endregion
99
+ export { all, filter, run, sort };
@@ -0,0 +1,30 @@
1
+ import { resolve } from "./url.js";
2
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js
3
+ function getSchemaBasePath(basePath, value) {
4
+ const schemaId = getSchemaId(value);
5
+ return schemaId ? resolve(basePath, schemaId) : basePath;
6
+ }
7
+ function usesDynamicIdScope(value) {
8
+ if (!value || typeof value !== "object" || ArrayBuffer.isView(value)) return false;
9
+ const schema = value.$schema;
10
+ if (typeof schema === "string" && (schema.includes("draft/2019-09/") || schema.includes("draft/2020-12/") || schema.includes("oas/3.1/"))) return true;
11
+ const openapi = value.openapi;
12
+ return typeof openapi === "string" && /^3\.1(?:\.|$)/.test(openapi);
13
+ }
14
+ function registerSchemaResources($refs, basePath, value, pathType, dynamicIdScope = false) {
15
+ if (!dynamicIdScope) return;
16
+ const seen = /* @__PURE__ */ new Set();
17
+ const visit = (node, scopeBase) => {
18
+ if (!node || typeof node !== "object" || ArrayBuffer.isView(node) || seen.has(node)) return;
19
+ seen.add(node);
20
+ const nextScopeBase = getSchemaBasePath(scopeBase, node);
21
+ if (nextScopeBase !== scopeBase) $refs._addAlias(nextScopeBase, node, pathType, dynamicIdScope);
22
+ for (const key of Object.keys(node)) visit(node[key], nextScopeBase);
23
+ };
24
+ visit(value, basePath);
25
+ }
26
+ function getSchemaId(value) {
27
+ if (value && typeof value === "object" && "$id" in value && typeof value.$id === "string" && value.$id.length > 0) return value.$id;
28
+ }
29
+ //#endregion
30
+ export { getSchemaBasePath, registerSchemaResources, usesDynamicIdScope };