@kubb/plugin-redoc 5.0.10 → 5.0.13

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/index.cjs CHANGED
@@ -31,11 +31,11 @@ let kubb_kit = require("kubb/kit");
31
31
  //#region kubb-extension.json
32
32
  var compatibility = {
33
33
  "kubb": ">=5.8.3",
34
- "node": ">=22"
34
+ "node": ">=22.12"
35
35
  };
36
36
  //#endregion
37
37
  //#region package.json
38
- var version = "5.0.10";
38
+ var version = "5.0.13";
39
39
  //#endregion
40
40
  //#region src/redoc.ts
41
41
  const htmlEscapes = {
@@ -0,0 +1,58 @@
1
+ import { Output, PluginType } from "kubb/kit";
2
+ //#region src/types.d.ts
3
+ type Options = {
4
+ /**
5
+ * Output location of the generated Redoc HTML file. The path is resolved
6
+ * against the global `output.path` set on `defineConfig`.
7
+ */
8
+ output?: {
9
+ /**
10
+ * File path of the generated HTML, relative to the global `output.path`.
11
+ * Unlike most plugins, this points at a single file rather than a directory.
12
+ *
13
+ * @default 'docs.html'
14
+ */
15
+ path: string;
16
+ };
17
+ };
18
+ type ResolveOptions = {
19
+ output: Output;
20
+ };
21
+ type PluginRedoc = PluginType<'plugin-redoc', Options, ResolveOptions>;
22
+ declare global {
23
+ namespace Kubb {
24
+ interface PluginRegistry {
25
+ 'plugin-redoc': PluginRedoc;
26
+ }
27
+ }
28
+ }
29
+ //#endregion
30
+ //#region src/plugin.d.ts
31
+ /**
32
+ * Canonical plugin name for `@kubb/plugin-redoc`. Used for driver lookups and
33
+ * cross-plugin dependency references.
34
+ */
35
+ export declare const pluginRedocName = "plugin-redoc";
36
+ /**
37
+ * Generates a self-contained static HTML documentation page from your OpenAPI
38
+ * spec using Redoc. The file is regenerated on every Kubb build, so the docs
39
+ * stay in lockstep with the spec the rest of your code is generated from.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * import { defineConfig } from 'kubb/config'
44
+ * import { pluginRedoc } from '@kubb/plugin-redoc'
45
+ *
46
+ * export default defineConfig({
47
+ * input: './petStore.yaml',
48
+ * output: { path: './src/gen' },
49
+ * plugins: [
50
+ * pluginRedoc({ output: { path: 'docs.html' } }),
51
+ * ],
52
+ * })
53
+ * ```
54
+ */
55
+ export declare const pluginRedoc: import("kubb/kit").PluginFactory<PluginRedoc>;
56
+ //#endregion
57
+ export { type PluginRedoc, pluginRedoc as default };
58
+ //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
2
1
  import { Output, PluginType } from "kubb/kit";
3
2
  //#region src/types.d.ts
4
3
  type Options = {
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import "./rolldown-runtime-C0LytTxp.js";
2
1
  import path from "node:path";
3
2
  import { adapterOasName } from "@kubb/adapter-oas";
4
3
  import { Diagnostics, ast, defineExtension, injectFile, useConfig } from "kubb/kit";
4
+ //#endregion
5
5
  //#region kubb-extension.json
6
6
  var compatibility = {
7
7
  "kubb": ">=5.8.3",
8
- "node": ">=22"
8
+ "node": ">=22.12"
9
9
  };
10
10
  //#endregion
11
11
  //#region package.json
12
- var version = "5.0.10";
12
+ var version = "5.0.13";
13
13
  //#endregion
14
14
  //#region src/redoc.ts
15
15
  const htmlEscapes = {
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "compatibility": {
21
21
  "kubb": ">=5.8.3",
22
- "node": ">=22"
22
+ "node": ">=22.12"
23
23
  },
24
24
  "options": [
25
25
  {
@@ -29,6 +29,20 @@
29
29
  "description": "Path of the generated HTML file. End it in .html.",
30
30
  "type": "text",
31
31
  "default": "docs.html"
32
+ },
33
+ {
34
+ "key": "banner",
35
+ "path": ["output", "banner"],
36
+ "label": "Banner",
37
+ "description": "Text added at the top of every generated file",
38
+ "type": "text"
39
+ },
40
+ {
41
+ "key": "footer",
42
+ "path": ["output", "footer"],
43
+ "label": "Footer",
44
+ "description": "Text added at the end of every generated file",
45
+ "type": "text"
32
46
  }
33
47
  ]
34
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-redoc",
3
- "version": "5.0.10",
3
+ "version": "5.0.13",
4
4
  "description": "Generate a ReDoc API reference page with Kubb. Produces a standalone HTML file you can host without a build step.",
5
5
  "keywords": [
6
6
  "api-docs",
@@ -53,9 +53,14 @@
53
53
  },
54
54
  "exports": {
55
55
  ".": {
56
- "types": "./dist/index.d.ts",
57
- "import": "./dist/index.js",
58
- "require": "./dist/index.cjs"
56
+ "import": {
57
+ "types": "./dist/index.d.ts",
58
+ "default": "./dist/index.js"
59
+ },
60
+ "require": {
61
+ "types": "./dist/index.d.cts",
62
+ "default": "./dist/index.cjs"
63
+ }
59
64
  },
60
65
  "./package.json": "./package.json",
61
66
  "./kubb-extension.json": "./kubb-extension.json"
@@ -65,16 +70,16 @@
65
70
  "registry": "https://registry.npmjs.org/"
66
71
  },
67
72
  "dependencies": {
68
- "@kubb/adapter-oas": "^5.10.2"
73
+ "@kubb/adapter-oas": "^5.12.5"
69
74
  },
70
75
  "devDependencies": {
71
- "kubb": "^5.10.2"
76
+ "kubb": "^5.12.5"
72
77
  },
73
78
  "peerDependencies": {
74
- "kubb": "^5.10.2"
79
+ "kubb": "^5.12.5"
75
80
  },
76
81
  "engines": {
77
- "node": ">=22"
82
+ "node": ">=22.12"
78
83
  },
79
84
  "scripts": {
80
85
  "build": "tsdown",
@@ -1,8 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __defProp = Object.defineProperty;
3
- var __name = (target, value) => __defProp(target, "name", {
4
- value,
5
- configurable: true
6
- });
7
- //#endregion
8
- export { __name as t };