fumadocs-openapi 10.8.0 → 10.8.1
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/generate-file.d.ts +2 -0
- package/dist/generate-file.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.5.2}/node_modules/@scalar/helpers/dist/general/create-limiter.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.5.2}/node_modules/@scalar/helpers/dist/object/is-object.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.5.2}/node_modules/@scalar/helpers/dist/object/prevent-pollution.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.5.2}/node_modules/@scalar/helpers/dist/queue/queue.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.5.2}/node_modules/@scalar/helpers/dist/string/generate-hash.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/bundle/bundle.js +13 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/bundle/value-generator.js +17 -3
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/normalize.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.6}/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.6}/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.6}/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.6}/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.6}/node_modules/@scalar/openapi-upgrader/dist/upgrade.js +1 -1
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/anchors.js +5 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +8 -0
- package/dist/utils/document/process.js +5 -5
- package/package.json +13 -13
- /package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js +0 -0
- /package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.8}/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +0 -0
package/dist/generate-file.d.ts
CHANGED
|
@@ -60,7 +60,9 @@ interface GenerateFilesConfig extends PagesToTextOptions {
|
|
|
60
60
|
beforeWrite?: (this: BeforeWriteContext, files: OutputFile[]) => void | Promise<void>;
|
|
61
61
|
}
|
|
62
62
|
interface MetaOptions {
|
|
63
|
+
/** @deprecated use `folderStyle` instead */
|
|
63
64
|
groupStyle?: 'folder' | 'separator';
|
|
65
|
+
folderStyle?: 'folder' | 'separator';
|
|
64
66
|
}
|
|
65
67
|
type Config = SchemaToPagesOptions & GenerateFilesConfig & {
|
|
66
68
|
/**
|
package/dist/generate-file.js
CHANGED
|
@@ -65,14 +65,14 @@ async function generateFilesOnly(options) {
|
|
|
65
65
|
}
|
|
66
66
|
function generateMeta(context, options) {
|
|
67
67
|
const files = [];
|
|
68
|
-
const
|
|
68
|
+
const folderStyle = options.folderStyle ?? options.groupStyle ?? "folder";
|
|
69
69
|
function scan(entries, parent) {
|
|
70
70
|
const pages = [];
|
|
71
71
|
for (const entry of entries) {
|
|
72
72
|
const relativePath = PathUtils.slash(parent ? path$1.relative(parent.path, entry.path) : entry.path);
|
|
73
73
|
if (entry.type === "group") {
|
|
74
74
|
scan(entry.entries, entry);
|
|
75
|
-
if (
|
|
75
|
+
if (folderStyle === "folder") pages.push(relativePath);
|
|
76
76
|
else pages.push(`---${entry.info.title}---`, `...${relativePath}`);
|
|
77
77
|
} else pages.push(relativePath.slice(0, -path$1.extname(entry.path).length));
|
|
78
78
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Queue } from "../queue/queue.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.2/node_modules/@scalar/helpers/dist/general/create-limiter.js
|
|
3
3
|
/**
|
|
4
4
|
* Creates a function that limits the number of concurrent executions of async functions.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.2/node_modules/@scalar/helpers/dist/object/is-object.js
|
|
2
2
|
/**
|
|
3
3
|
* Returns true if the provided value is a record object
|
|
4
4
|
* (i.e. not null, not an array, and has an actual object as the prototype).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.2/node_modules/@scalar/helpers/dist/object/prevent-pollution.js
|
|
2
2
|
/**
|
|
3
3
|
* Set of dangerous keys that can be used for prototype pollution attacks.
|
|
4
4
|
* These keys should never be used as property names in dynamic object operations.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.2/node_modules/@scalar/helpers/dist/queue/queue.js
|
|
2
2
|
/**
|
|
3
3
|
* Represents a node in a singly linked list structure, used internally by the Queue.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.5.2/node_modules/@scalar/helpers/dist/string/generate-hash.js
|
|
2
2
|
/**
|
|
3
3
|
* MurmurHash3 implementation
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isObject } from "../../../../../../@scalar_helpers@0.5.
|
|
1
|
+
import { isObject } from "../../../../../../@scalar_helpers@0.5.2/node_modules/@scalar/helpers/dist/object/is-object.js";
|
|
2
2
|
import { convertToLocalRef } from "../helpers/convert-to-local-ref.js";
|
|
3
3
|
import { getId, getSchemas } from "../helpers/get-schemas.js";
|
|
4
4
|
import { getValueByPath } from "../helpers/get-value-by-path.js";
|
|
@@ -10,7 +10,7 @@ import { setValueAtPath } from "../helpers/set-value-at-path.js";
|
|
|
10
10
|
import { toRelativePath } from "../helpers/to-relative-path.js";
|
|
11
11
|
import { escapeJsonPointer } from "../helpers/escape-json-pointer.js";
|
|
12
12
|
import { getHash, uniqueValueGeneratorFactory } from "./value-generator.js";
|
|
13
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
13
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/bundle/bundle.js
|
|
14
14
|
/** Type guard to check if a value is an object with a $ref property */
|
|
15
15
|
const hasRef = (value) => isObject(value) && "$ref" in value && typeof value["$ref"] === "string";
|
|
16
16
|
/**
|
|
@@ -155,7 +155,18 @@ const resolveAndCopyReferences = (targetDocument, sourceDocument, referencePath,
|
|
|
155
155
|
* These custom extensions help maintain the structure and traceability of bundled documents.
|
|
156
156
|
*/
|
|
157
157
|
const extensions = {
|
|
158
|
+
/**
|
|
159
|
+
* Custom OpenAPI extension key used to store external references.
|
|
160
|
+
* This key will contain all bundled external documents.
|
|
161
|
+
* The x-ext key is used to maintain a clean separation between the main
|
|
162
|
+
* OpenAPI document and its bundled external references.
|
|
163
|
+
*/
|
|
158
164
|
externalDocuments: "x-ext",
|
|
165
|
+
/**
|
|
166
|
+
* Custom OpenAPI extension key used to maintain a mapping between
|
|
167
|
+
* hashed keys and their original URLs in x-ext.
|
|
168
|
+
* This mapping is essential for tracking the source of bundled references
|
|
169
|
+
*/
|
|
159
170
|
externalDocumentsMappings: "x-ext-urls"
|
|
160
171
|
};
|
|
161
172
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHttpUrl } from "../../../helpers/is-http-url.js";
|
|
2
|
-
import { createLimiter } from "../../../../../../../../@scalar_helpers@0.5.
|
|
2
|
+
import { createLimiter } from "../../../../../../../../@scalar_helpers@0.5.2/node_modules/@scalar/helpers/dist/general/create-limiter.js";
|
|
3
3
|
import { normalize } from "../../../helpers/normalize.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js
|
|
5
5
|
/**
|
|
6
6
|
* Safely checks for host from a URL
|
|
7
7
|
* Needed because we cannot create a URL from a relative remote URL ex: examples/openapi.json
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isFilePath } from "../../../helpers/is-file-path.js";
|
|
2
2
|
import { normalize } from "../../../helpers/normalize.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js
|
|
4
4
|
/**
|
|
5
5
|
* Reads and normalizes data from a local file
|
|
6
6
|
* @param path - The file path to read from
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { generateHash } from "../../../../../../@scalar_helpers@0.5.
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
import { generateHash } from "../../../../../../@scalar_helpers@0.5.2/node_modules/@scalar/helpers/dist/string/generate-hash.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/bundle/value-generator.js
|
|
3
3
|
/**
|
|
4
4
|
* Generates a short hash from a string value using xxhash.
|
|
5
5
|
*
|
|
@@ -75,7 +75,21 @@ async function generateUniqueValue(compress, value, compressedToValue, prevCompr
|
|
|
75
75
|
*/
|
|
76
76
|
const uniqueValueGeneratorFactory = (compress, compressedToValue) => {
|
|
77
77
|
const valueToCompressed = Object.fromEntries(Object.entries(compressedToValue).map(([key, value]) => [value, key]));
|
|
78
|
-
return {
|
|
78
|
+
return {
|
|
79
|
+
/**
|
|
80
|
+
* Generates a unique compressed value for the given input string.
|
|
81
|
+
* First checks if a compressed value already exists in the cache.
|
|
82
|
+
* If not, generates a new unique compressed value and stores it in the cache.
|
|
83
|
+
*
|
|
84
|
+
* @param value - The original string value to compress
|
|
85
|
+
* @returns A Promise that resolves to the compressed string value
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* const generator = uniqueValueGeneratorFactory(compress, {})
|
|
89
|
+
* const compressed = await generator.generate('example.com/schema.json')
|
|
90
|
+
* // Returns a unique compressed value like 'example'
|
|
91
|
+
*/
|
|
92
|
+
generate: async (value) => {
|
|
79
93
|
const cache = valueToCompressed[value];
|
|
80
94
|
if (cache) return cache;
|
|
81
95
|
const generatedValue = await generateUniqueValue(compress, value, compressedToValue);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js
|
|
2
2
|
/**
|
|
3
3
|
* Translates a JSON Reference ($ref) to a local object path within the root schema.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js
|
|
2
2
|
/**
|
|
3
3
|
* Escapes a JSON pointer string.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js
|
|
2
2
|
/**
|
|
3
3
|
* Retrieves the $id property from the input object if it exists and is a string.
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unescapeJsonPointer } from "./unescape-json-pointer.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js
|
|
3
3
|
/**
|
|
4
4
|
* Translate `/paths/~1test` to `['paths', '/test']`
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getId } from "./get-schemas.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js
|
|
3
3
|
/**
|
|
4
4
|
* Traverses an object using an array of string segments (path keys) and returns
|
|
5
5
|
* the value at the specified path along with its context (id if available).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHttpUrl } from "./is-http-url.js";
|
|
2
2
|
import { isJsonObject } from "./is-json-object.js";
|
|
3
3
|
import { isYaml } from "./is-yaml.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js
|
|
5
5
|
/**
|
|
6
6
|
* Checks if a string represents a file path by ensuring it's not a remote URL,
|
|
7
7
|
* YAML content, or JSON content.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js
|
|
2
2
|
/**
|
|
3
3
|
* Checks if a string is a remote URL (starts with http:// or https://)
|
|
4
4
|
* @param value - The URL string to check
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isObject } from "../../../../../../@scalar_helpers@0.5.
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
import { isObject } from "../../../../../../@scalar_helpers@0.5.2/node_modules/@scalar/helpers/dist/object/is-object.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js
|
|
3
3
|
/**
|
|
4
4
|
* Determines if a string represents a valid JSON object (i.e., a plain object, not an array, primitive, or null).
|
|
5
5
|
* The function first checks if the string appears to start with an opening curly brace (ignoring leading whitespace),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js
|
|
2
2
|
/**
|
|
3
3
|
* Checks if a string appears to be YAML content.
|
|
4
4
|
* This function uses a simple heuristic: it looks for a line that starts with an optional dash,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parse } from "../../../../../../yaml@2.8.3/node_modules/yaml/browser/dist/public-api.js";
|
|
2
2
|
import "../../../../../../yaml@2.8.3/node_modules/yaml/browser/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/normalize.js
|
|
4
4
|
/**
|
|
5
5
|
* Normalize a string (YAML, JSON, object) to a JavaScript datatype.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHttpUrl } from "./is-http-url.js";
|
|
2
2
|
import { posix } from "../../../../../../pathe@2.0.3/node_modules/pathe/dist/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js
|
|
4
4
|
/**
|
|
5
5
|
* Resolves a reference path by combining a base path with a relative path.
|
|
6
6
|
* Handles both remote URLs and local file paths.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { preventPollution } from "../../../../../../@scalar_helpers@0.5.
|
|
1
|
+
import { preventPollution } from "../../../../../../@scalar_helpers@0.5.2/node_modules/@scalar/helpers/dist/object/prevent-pollution.js";
|
|
2
2
|
import { getSegmentsFromPath } from "./get-segments-from-path.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js
|
|
4
4
|
/**
|
|
5
5
|
* Sets a value at a specified path in an object, creating intermediate objects/arrays as needed.
|
|
6
6
|
* This function traverses the object structure and creates any missing intermediate objects
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHttpUrl } from "./is-http-url.js";
|
|
2
2
|
import { posix } from "../../../../../../pathe@2.0.3/node_modules/pathe/dist/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js
|
|
4
4
|
/**
|
|
5
5
|
* Converts an input path or URL to a relative path based on the provided base.
|
|
6
6
|
* Handles both remote URLs and local file system paths.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.8/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js
|
|
2
2
|
/**
|
|
3
3
|
* Unescape JSON pointer
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { traverse } from "../helpers/traverse.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.6/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js
|
|
3
3
|
const DEFAULT_MEDIA_TYPE = "application/json";
|
|
4
4
|
/** Extracts and removes x-example and x-examples extensions from an object */
|
|
5
5
|
function extractXExampleExtensions(obj) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { traverse } from "../helpers/traverse.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.6/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js
|
|
3
3
|
const SCHEMA_SEGMENTS = new Set([
|
|
4
4
|
"properties",
|
|
5
5
|
"items",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.6/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js
|
|
2
2
|
/**
|
|
3
3
|
* Recursively migrate XML object properties from 3.1 to 3.2 format
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.6/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js
|
|
2
2
|
/**
|
|
3
3
|
* Recursively traverses the content and applies the transform function to each node.
|
|
4
4
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { upgradeFromThreeOneToThreeTwo } from "./3.1-to-3.2/upgrade-from-three-one-to-three-two.js";
|
|
2
2
|
import { upgradeFromTwoToThree } from "./2.0-to-3.0/upgrade-from-two-to-three.js";
|
|
3
3
|
import { upgradeFromThreeToThreeOne } from "./3.0-to-3.1/upgrade-from-three-to-three-one.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.6/node_modules/@scalar/openapi-upgrader/dist/upgrade.js
|
|
5
5
|
function upgrade(value, targetVersion) {
|
|
6
6
|
const openapi30 = upgradeFromTwoToThree(value);
|
|
7
7
|
if (targetVersion === "3.0") return openapi30;
|
|
@@ -39,6 +39,11 @@ function createNodeAnchors(doc, prefix) {
|
|
|
39
39
|
prevAnchors.add(anchor);
|
|
40
40
|
return anchor;
|
|
41
41
|
},
|
|
42
|
+
/**
|
|
43
|
+
* With circular references, the source node is only resolved after all
|
|
44
|
+
* of its child nodes are. This is why anchors are set only after all of
|
|
45
|
+
* the nodes have been created.
|
|
46
|
+
*/
|
|
42
47
|
setAnchors: () => {
|
|
43
48
|
for (const source of aliasObjects) {
|
|
44
49
|
const ref = sourceObjects.get(source);
|
package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js
CHANGED
|
@@ -5,6 +5,14 @@ const binary = {
|
|
|
5
5
|
identify: (value) => value instanceof Uint8Array,
|
|
6
6
|
default: false,
|
|
7
7
|
tag: "tag:yaml.org,2002:binary",
|
|
8
|
+
/**
|
|
9
|
+
* Returns a Buffer in node and an Uint8Array in browsers
|
|
10
|
+
*
|
|
11
|
+
* To use the resulting buffer as an image, you'll want to do something like:
|
|
12
|
+
*
|
|
13
|
+
* const blob = new Blob([buffer], { type: 'image/jpeg' })
|
|
14
|
+
* document.querySelector('#photo').src = URL.createObjectURL(blob)
|
|
15
|
+
*/
|
|
8
16
|
resolve(src, onError) {
|
|
9
17
|
if (typeof atob === "function") {
|
|
10
18
|
const str = atob(src.replace(/[\n\r]/g, ""));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { bundle } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.
|
|
2
|
-
import { upgrade } from "../../node_modules/.pnpm/@scalar_openapi-upgrader@0.2.
|
|
3
|
-
import { fetchUrls } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.
|
|
4
|
-
import { readFiles } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.
|
|
5
|
-
import "../../node_modules/.pnpm/@scalar_json-magic@0.12.
|
|
1
|
+
import { bundle } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.8/node_modules/@scalar/json-magic/dist/bundle/bundle.js";
|
|
2
|
+
import { upgrade } from "../../node_modules/.pnpm/@scalar_openapi-upgrader@0.2.6/node_modules/@scalar/openapi-upgrader/dist/upgrade.js";
|
|
3
|
+
import { fetchUrls } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.8/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js";
|
|
4
|
+
import { readFiles } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.8/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js";
|
|
5
|
+
import "../../node_modules/.pnpm/@scalar_json-magic@0.12.8/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js";
|
|
6
6
|
import { dereferenceDocument } from "./dereference.js";
|
|
7
7
|
//#region src/utils/document/process.ts
|
|
8
8
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-openapi",
|
|
3
|
-
"version": "10.8.
|
|
3
|
+
"version": "10.8.1",
|
|
4
4
|
"description": "Generate MDX docs for your OpenAPI spec",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
49
49
|
"@radix-ui/react-select": "^2.2.6",
|
|
50
50
|
"@radix-ui/react-slot": "^1.2.4",
|
|
51
|
-
"ajv": "^8.
|
|
51
|
+
"ajv": "^8.20.0",
|
|
52
52
|
"chokidar": "^5.0.0",
|
|
53
53
|
"class-variance-authority": "^0.7.1",
|
|
54
54
|
"github-slugger": "^2.0.0",
|
|
55
55
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
56
56
|
"js-yaml": "^4.1.1",
|
|
57
|
-
"lucide-react": "^1.
|
|
57
|
+
"lucide-react": "^1.11.0",
|
|
58
58
|
"remark": "^15.0.1",
|
|
59
59
|
"remark-rehype": "^11.1.2",
|
|
60
60
|
"shiki": "^4.0.2",
|
|
@@ -65,18 +65,18 @@
|
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@fastify/deepmerge": "^3.2.1",
|
|
67
67
|
"@scalar/api-client-react": "2.0.1",
|
|
68
|
-
"@scalar/json-magic": "^0.12.
|
|
69
|
-
"@scalar/openapi-upgrader": "^0.2.
|
|
68
|
+
"@scalar/json-magic": "^0.12.8",
|
|
69
|
+
"@scalar/openapi-upgrader": "^0.2.6",
|
|
70
|
+
"@tailwindcss/oxide": "^4.2.4",
|
|
70
71
|
"@types/js-yaml": "^4.0.9",
|
|
71
72
|
"@types/node": "25.6.0",
|
|
72
73
|
"@types/react": "^19.2.14",
|
|
73
74
|
"fast-content-type-parse": "^3.0.0",
|
|
74
75
|
"json-schema-typed": "^8.0.2",
|
|
75
|
-
"tailwindcss": "^4.2.
|
|
76
|
-
"tsdown": "0.21.
|
|
77
|
-
"
|
|
78
|
-
"fumadocs-
|
|
79
|
-
"fumadocs-ui": "16.8.1",
|
|
76
|
+
"tailwindcss": "^4.2.4",
|
|
77
|
+
"tsdown": "0.21.10",
|
|
78
|
+
"fumadocs-core": "16.8.5",
|
|
79
|
+
"fumadocs-ui": "16.8.5",
|
|
80
80
|
"tsconfig": "0.0.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
},
|
|
102
102
|
"inlinedDependencies": {
|
|
103
103
|
"@fastify/deepmerge": "3.2.1",
|
|
104
|
-
"@scalar/helpers": "0.5.
|
|
105
|
-
"@scalar/json-magic": "0.12.
|
|
106
|
-
"@scalar/openapi-upgrader": "0.2.
|
|
104
|
+
"@scalar/helpers": "0.5.2",
|
|
105
|
+
"@scalar/json-magic": "0.12.8",
|
|
106
|
+
"@scalar/openapi-upgrader": "0.2.6",
|
|
107
107
|
"fast-content-type-parse": "3.0.0",
|
|
108
108
|
"pathe": "2.0.3",
|
|
109
109
|
"yaml": "2.8.3"
|
|
File without changes
|