fumadocs-openapi 10.7.0 → 10.7.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.
@@ -145,6 +145,7 @@ function parseBlockScalarHeader({ offset, props }, strict, onError) {
145
145
  onError(token, "UNEXPECTED_TOKEN", token.message);
146
146
  length += token.source.length;
147
147
  break;
148
+ /* istanbul ignore next should not happen */
148
149
  default: {
149
150
  onError(token, "UNEXPECTED_TOKEN", `Unexpected token in block scalar header: ${token.type}`);
150
151
  const ts = token.source;
@@ -19,6 +19,7 @@ function resolveFlowScalar(scalar, strict, onError) {
19
19
  _type = Scalar.QUOTE_DOUBLE;
20
20
  value = doubleQuotedValue(source, _onError);
21
21
  break;
22
+ /* istanbul ignore next should not happen */
22
23
  default:
23
24
  onError(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type}`);
24
25
  return {
@@ -48,6 +49,7 @@ function resolveFlowScalar(scalar, strict, onError) {
48
49
  function plainValue(source, onError) {
49
50
  let badChar = "";
50
51
  switch (source[0]) {
52
+ /* istanbul ignore next should not happen */
51
53
  case " ":
52
54
  badChar = "a tab character";
53
55
  break;
@@ -32,6 +32,7 @@ function getPrevProps(parent) {
32
32
  return it.sep ?? it.start;
33
33
  }
34
34
  case "block-seq": return parent.items[parent.items.length - 1].start;
35
+ /* istanbul ignore next should not happen */
35
36
  default: return [];
36
37
  }
37
38
  }
@@ -283,6 +284,7 @@ var Parser = class {
283
284
  });
284
285
  return;
285
286
  }
287
+ /* istanbul ignore next should not happen */
286
288
  default:
287
289
  yield* this.pop();
288
290
  yield* this.pop(token);
@@ -400,6 +402,7 @@ var Parser = class {
400
402
  }
401
403
  yield* this.pop();
402
404
  break;
405
+ /* istanbul ignore next should not happen */
403
406
  default:
404
407
  yield* this.pop();
405
408
  yield* this.step();
@@ -1,3 +1,3 @@
1
1
  import { OpenAPIOptions, OpenAPIServer, createCodeSample, createOpenAPI } from "./create.js";
2
- import { InternalOpenAPIMeta, openapiPlugin, openapiSource, transformerOpenAPI } from "./source-api.js";
3
- export { InternalOpenAPIMeta, OpenAPIOptions, OpenAPIServer, createCodeSample, createOpenAPI, openapiPlugin, openapiSource, transformerOpenAPI };
2
+ import { InternalOpenAPIMeta, OpenAPIPageData, OpenAPISourceOptions, openapiPlugin, openapiSource, transformerOpenAPI } from "./source-api.js";
3
+ export { InternalOpenAPIMeta, OpenAPIOptions, OpenAPIPageData, OpenAPIServer, OpenAPISourceOptions, createCodeSample, createOpenAPI, openapiPlugin, openapiSource, transformerOpenAPI };
@@ -33,16 +33,16 @@ interface OpenAPIPageData extends PageData {
33
33
  structuredData: StructuredData;
34
34
  toc: TOCItemType[];
35
35
  }
36
- interface MetaOptions {
37
- folderStyle?: 'folder' | 'separator';
38
- }
36
+ type OpenAPISourceOptions = SchemaToPagesOptions & {
37
+ baseDir?: string; /** Generate `meta.json` files */
38
+ meta?: boolean | {
39
+ folderStyle?: 'folder' | 'separator';
40
+ };
41
+ };
39
42
  /**
40
43
  * Generate virtual pages for Fumadocs Source API
41
44
  */
42
- declare function openapiSource(server: OpenAPIServer, options?: SchemaToPagesOptions & {
43
- baseDir?: string; /** Generate `meta.json` files */
44
- meta?: boolean | MetaOptions;
45
- }): Promise<Source<{
45
+ declare function openapiSource(server: OpenAPIServer, options?: OpenAPISourceOptions): Promise<Source<{
46
46
  metaData: MetaData;
47
47
  pageData: OpenAPIPageData;
48
48
  }>>;
@@ -51,4 +51,4 @@ declare function openapiSource(server: OpenAPIServer, options?: SchemaToPagesOpt
51
51
  */
52
52
  declare function transformerOpenAPI(): PageTreeTransformer;
53
53
  //#endregion
54
- export { InternalOpenAPIMeta, openapiPlugin, openapiSource, transformerOpenAPI };
54
+ export { InternalOpenAPIMeta, OpenAPIPageData, OpenAPISourceOptions, openapiPlugin, openapiSource, transformerOpenAPI };
@@ -97,7 +97,7 @@ async function openapiSource(server, options = {}) {
97
97
  else pages.push(`---${entry.info.title}---`, `...${relativePath}`);
98
98
  } else {
99
99
  onEntry(entry);
100
- pages.push(relativePath.slice(0, -path.extname(entry.path).length));
100
+ pages.push(relativePath.slice(0, -PathUtils.extname(entry.path).length));
101
101
  }
102
102
  }
103
103
  if (pages.length === 0) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "10.7.0",
3
+ "version": "10.7.1",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "Docs",
@@ -73,10 +73,10 @@
73
73
  "fast-content-type-parse": "^3.0.0",
74
74
  "json-schema-typed": "^8.0.2",
75
75
  "tailwindcss": "^4.2.2",
76
- "tsdown": "0.21.7",
76
+ "tsdown": "0.21.8",
77
77
  "@fumadocs/tailwind": "0.0.5",
78
- "fumadocs-core": "16.7.15",
79
- "fumadocs-ui": "16.7.15",
78
+ "fumadocs-core": "16.7.16",
79
+ "fumadocs-ui": "16.7.16",
80
80
  "tsconfig": "0.0.0"
81
81
  },
82
82
  "peerDependencies": {