@kubb/plugin-redoc 5.0.10 → 5.0.12
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 +2 -2
- package/dist/index.d.cts +58 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +3 -3
- package/kubb-extension.json +1 -1
- package/package.json +13 -8
- package/dist/rolldown-runtime-C0LytTxp.js +0 -8
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.
|
|
38
|
+
var version = "5.0.12";
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/redoc.ts
|
|
41
41
|
const htmlEscapes = {
|
package/dist/index.d.cts
ADDED
|
@@ -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
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.
|
|
12
|
+
var version = "5.0.12";
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/redoc.ts
|
|
15
15
|
const htmlEscapes = {
|
package/kubb-extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-redoc",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.12",
|
|
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
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
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.
|
|
73
|
+
"@kubb/adapter-oas": "^5.10.3"
|
|
69
74
|
},
|
|
70
75
|
"devDependencies": {
|
|
71
|
-
"kubb": "^5.10.
|
|
76
|
+
"kubb": "^5.10.3"
|
|
72
77
|
},
|
|
73
78
|
"peerDependencies": {
|
|
74
|
-
"kubb": "^5.10.
|
|
79
|
+
"kubb": "^5.10.3"
|
|
75
80
|
},
|
|
76
81
|
"engines": {
|
|
77
|
-
"node": ">=22"
|
|
82
|
+
"node": ">=22.12"
|
|
78
83
|
},
|
|
79
84
|
"scripts": {
|
|
80
85
|
"build": "tsdown",
|